From 11e00a4a0a3771097ddddcdb8fa3c417407adf3b Mon Sep 17 00:00:00 2001 From: Gard Spreemann Date: Thu, 23 May 2019 12:48:45 +0200 Subject: Upstream 0.1.4 tarball as released on PyPI. --- tests/test_api.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 tests/test_api.py (limited to 'tests/test_api.py') 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' -- cgit v1.2.3