diff options
author | Gard Spreemann <gspr@nonempty.org> | 2019-05-23 12:48:45 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2019-05-23 12:48:45 +0200 |
commit | 11e00a4a0a3771097ddddcdb8fa3c417407adf3b (patch) | |
tree | 38851369c64aa08f966d1b2a28645721b5b4bc43 /tests |
Upstream 0.1.4 tarball as released on PyPI.upstream/0.1.4
Diffstat (limited to 'tests')
-rw-r--r-- | tests/requirements-dev.txt | 7 | ||||
-rw-r--r-- | tests/requirements-tests.in | 7 | ||||
-rw-r--r-- | tests/requirements-tests.txt | 9 | ||||
-rw-r--r-- | tests/test_api.py | 13 |
4 files changed, 36 insertions, 0 deletions
diff --git a/tests/requirements-dev.txt b/tests/requirements-dev.txt new file mode 100644 index 0000000..049cc41 --- /dev/null +++ b/tests/requirements-dev.txt @@ -0,0 +1,7 @@ +check-manifest +detox +pip-tools +pyroma +tox +tox-pyenv +zest.releaser diff --git a/tests/requirements-tests.in b/tests/requirements-tests.in new file mode 100644 index 0000000..1017996 --- /dev/null +++ b/tests/requirements-tests.in @@ -0,0 +1,7 @@ +pytest +pytest-flakes +pytest-cov +pytest-env +pytest-mccabe +pytest-pep8 +pytest-runner diff --git a/tests/requirements-tests.txt b/tests/requirements-tests.txt new file mode 100644 index 0000000..ad28cc6 --- /dev/null +++ b/tests/requirements-tests.txt @@ -0,0 +1,9 @@ +# +pytest-cov +pytest-env +pytest-flakes +pytest-mccabe +pytest-pep8 +pytest-runner +pytest +requests diff --git a/tests/test_api.py b/tests/test_api.py new file mode 100644 index 0000000..2403dca --- /dev/null +++ b/tests/test_api.py @@ -0,0 +1,13 @@ + +from __future__ import absolute_import, division, print_function, unicode_literals + +from cdsapi import api + + +def test_bytes_to_string(): + assert api.bytes_to_string(1) == '1' + assert api.bytes_to_string(1 << 10) == '1K' + assert api.bytes_to_string(1 << 20) == '1M' + assert api.bytes_to_string(1 << 30) == '1G' + assert api.bytes_to_string(1 << 40) == '1T' + assert api.bytes_to_string(1 << 50) == '1P' |