mirror of
https://github.com/lilydjwg/nvchecker.git
synced 2025-03-10 06:14:02 +00:00
commit
66123fbe9f
6 changed files with 34 additions and 0 deletions
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.
|
**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
|
Dependency
|
||||||
==========
|
==========
|
||||||
- Python 3
|
- Python 3
|
||||||
|
|
3
setup.py
3
setup.py
|
@ -9,6 +9,9 @@ setup(
|
||||||
version = nvchecker.__version__,
|
version = nvchecker.__version__,
|
||||||
packages = find_packages(),
|
packages = find_packages(),
|
||||||
install_requires = ['tornado', 'setuptools'],
|
install_requires = ['tornado', 'setuptools'],
|
||||||
|
tests_require=[
|
||||||
|
'pytest',
|
||||||
|
],
|
||||||
entry_points = {
|
entry_points = {
|
||||||
'console_scripts': [
|
'console_scripts': [
|
||||||
'nvchecker = nvchecker.main:main',
|
'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…
Add table
Reference in a new issue