Commit 8f5d4bc8 authored by xa's avatar xa

test against python3.5

parent 0bd4448f
Pipeline #455 passed with stage
aionsq/_version.py export-subst
---
before_script:
- apt install -y curl libsnappy-dev
- curl -O https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.3.5.linux-amd64.go1.4.2.tar.gz
- tar zxvf nsq-0.3.5.linux-amd64.go1.4.2.tar.gz
- apk add --no-cache snappy-dev
- >
curl -O https://s3.amazonaws.com/bitly-downloads/nsq/nsq-0.3.6.linux-amd64.go1.5.1.tar.gz
&& tar zxvf nsq-0.3.6.linux-amd64.go1.5.1.tar.gz
- python -m pip install -e .
- python -m pip install -r requirements-test.txt
- python -m pip install python-snappy
python3.4 tests:
cache:
paths:
- nsq-0.3.6.linux-amd64.go1.5.1
tests:
script:
- export PATH=$PATH:$PWD/nsq-0.3.5.linux-amd64.go1.4.2/bin
- echo $PATH
- export PATH=$PATH:$PWD/nsq-0.3.6.linux-amd64.go1.5.1/bin
- py.test --cov aionsq --cov-report term-missing tests/
tags:
- python3.4
- python3.5
include versioneer.py
include aionsq/_version.py
......@@ -7,4 +7,7 @@ __all__ = (client.__all__
+ http.__all__
+ lookup.__all__
+ tcp.__all__)
__version__ = '0.1'
from ._version import get_versions
__version__ = get_versions()['version']
del get_versions
This diff is collapsed.
[versioneer]
VCS = git
style = pep440
versionfile_source = aionsq/_version.py
versionfile_build = aionsq/_version.py
tag_prefix = v
[metadata]
description-file = README.rst
[flake8]
exclude = _version.py
ignore = F403
max-complexity = 10
max-line-length = 80
[wheel]
universal = 1
[coverage:run]
omit =
aionsq/_version.py
[coverage:report]
exclude_lines =
pragma: no cover
def __repr__
if self.debug:
if settings.DEBUG
raise AssertionError
raise NotImplementedError
if 0:
if __name__ == .__main__.:
[pytest]
flake8-ignore =
tests/*.py ALL
#!/usr/bin/env python
from setuptools import setup, find_packages, Command
import versioneer
class PyTest(Command):
user_options = []
......@@ -24,11 +24,15 @@ class PyTest(Command):
'--cov-report', 'html'])
raise SystemExit(errno)
cmdclass = versioneer.get_cmdclass()
cmdclass.update({'test': PyTest})
setup(
name='aionsq',
version=versioneer.get_version(),
packages=find_packages(),
install_requires=[
'aiohttp'
],
cmdclass = {'test': PyTest}
cmdclass=cmdclass
)
......@@ -16,7 +16,14 @@ def test_ping():
def test_info():
client = NSQClient(':4151')
data = yield from client.info()
assert data == {'version': '0.3.5'}
assert isinstance(data, dict)
assert 'broadcast_address' in data
assert 'hostname' in data
assert 'http_port' in data
assert 'start_time' in data
assert 'tcp_port' in data
assert data['http_port'] == 4151
assert data['tcp_port'] == 4150
client.close()
yield from client.wait_closed()
......
......@@ -16,7 +16,7 @@ def test_ping():
def test_info():
lookup = NSQLookup('http://127.0.0.1:4161')
data = yield from lookup.info()
assert data == {'version': '0.3.5'}
assert data == {'version': '0.3.6'}
lookup.close()
yield from lookup.wait_closed()
......
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment