mirror of
https://github.com/lilydjwg/nvchecker
synced 2025-02-19 12:06:59 +00:00
commit
66123fbe9f
7
.travis.yml
Normal file
7
.travis.yml
Normal file
@ -0,0 +1,7 @@
|
||||
sudo: false
|
||||
language: python
|
||||
python:
|
||||
- "3.4"
|
||||
- "3.5"
|
||||
install: pip install .
|
||||
script: py.test
|
@ -1,5 +1,7 @@
|
||||
**nvchecker** (short for *new version checker*) is for checking if a new version of some software has been released.
|
||||
|
||||
[](https://travis-ci.org/lilydjwg/nvchecker)
|
||||
|
||||
Dependency
|
||||
==========
|
||||
- Python 3
|
||||
|
3
setup.py
3
setup.py
@ -9,6 +9,9 @@ setup(
|
||||
version = nvchecker.__version__,
|
||||
packages = find_packages(),
|
||||
install_requires = ['tornado', 'setuptools'],
|
||||
tests_require=[
|
||||
'pytest',
|
||||
],
|
||||
entry_points = {
|
||||
'console_scripts': [
|
||||
'nvchecker = nvchecker.main:main',
|
||||
|
0
tests/__init__.py
Normal file
0
tests/__init__.py
Normal file
16
tests/helper.py
Normal file
16
tests/helper.py
Normal file
@ -0,0 +1,16 @@
|
||||
from nvchecker.get_version import get_version
|
||||
import tornado.testing
|
||||
|
||||
|
||||
class ExternalVersionTestCase(tornado.testing.AsyncTestCase):
|
||||
def sync_get_version(self, name, config):
|
||||
result = {}
|
||||
|
||||
def get_version_callback(name, version):
|
||||
result["version"] = version
|
||||
self.stop()
|
||||
|
||||
get_version(name, config, get_version_callback)
|
||||
self.wait()
|
||||
|
||||
return result["version"]
|
6
tests/test_npm.py
Normal file
6
tests/test_npm.py
Normal file
@ -0,0 +1,6 @@
|
||||
from tests.helper import ExternalVersionTestCase
|
||||
|
||||
|
||||
class NPMTest(ExternalVersionTestCase):
|
||||
def test_npm(self):
|
||||
self.assertEqual(self.sync_get_version("example", {"npm": None}), "0.0.0")
|
Loading…
Reference in New Issue
Block a user