diff options
author | Gard Spreemann <gspr@nonempty.org> | 2019-05-23 13:45:38 +0200 |
---|---|---|
committer | Gard Spreemann <gspr@nonempty.org> | 2019-05-23 13:45:38 +0200 |
commit | f15a4382091aae707a95302ee5a3ad5bafc724bc (patch) | |
tree | 8a8f2461f51e498a6b9fc1b7d21a2fa12c3ee562 /tests/test_api.py | |
parent | a025b6c38c32e4a580c6f521cee277a64d04fc12 (diff) | |
parent | 11e00a4a0a3771097ddddcdb8fa3c417407adf3b (diff) |
Merge tag 'upstream/0.1.4' into debian/latest
Upstream 0.1.4 tarball as released on PyPI.
Diffstat (limited to 'tests/test_api.py')
-rw-r--r-- | tests/test_api.py | 13 |
1 files changed, 13 insertions, 0 deletions
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' |