Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickw444 committed Mar 3, 2019
1 parent d12f7e8 commit 249e8d0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
7 changes: 5 additions & 2 deletions nessclient_tests/test_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,11 @@ async def test_aux_off(connection, client):
async def test_update(connection, client):
await client.update()
assert connection.write.call_count == 2
assert get_data(connection.write.call_args_list[0][0][0]) == b'S00'
assert get_data(connection.write.call_args_list[1][0][0]) == b'S14'
commands = {
get_data(connection.write.call_args_list[0][0][0]),
get_data(connection.write.call_args_list[1][0][0])
}
assert commands == {b'S00', b'S14'}


@pytest.mark.asyncio
Expand Down
8 changes: 6 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import os
import sys

from setuptools import setup

Expand All @@ -24,6 +25,9 @@ def get_version():
except Exception:
version = '0.0.0-dev'

needs_pytest = {'pytest', 'test', 'ptr'}.intersection(sys.argv)
pytest_runner = ['pytest-runner'] if needs_pytest else []

setup(
name='nessclient',
version=version,
Expand Down Expand Up @@ -51,6 +55,6 @@ def get_version():
'console_scripts': ['ness-cli=nessclient.cli.__main__:cli'],
},
test_suite='nessclient_tests',
setup_requires=['pytest-runner'],
tests_require=['pytest', 'pytest-asyncio', 'asynctest'],
setup_requires=[] + pytest_runner,
tests_require=['pytest==4.3.0', 'pytest-asyncio', 'asynctest'],
)

0 comments on commit 249e8d0

Please sign in to comment.