From a71e21abde0f45155c86d044bf609a7d37a891ba Mon Sep 17 00:00:00 2001 From: Alessandro Amici Date: Tue, 15 May 2018 20:09:53 +0200 Subject: Add first test and sync MANIFEST. --- tests/test_api.py | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 tests/test_api.py (limited to 'tests') diff --git a/tests/test_api.py b/tests/test_api.py new file mode 100644 index 0000000..f76a842 --- /dev/null +++ b/tests/test_api.py @@ -0,0 +1,11 @@ + +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