From c2d21a4c36cf9374b708f580af2fd420bb9b1146 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Wed, 2 Aug 2017 22:51:34 +0200 Subject: o Indenting with two spaces. o Reworking test to use pytest's parametrize --- test/tests.py | 48 ------------------------------------------------ 1 file changed, 48 deletions(-) delete mode 100644 test/tests.py (limited to 'test/tests.py') diff --git a/test/tests.py b/test/tests.py deleted file mode 100644 index a1c4ad7..0000000 --- a/test/tests.py +++ /dev/null @@ -1,48 +0,0 @@ -def test_formatting(): - import ee.formatting - import sys -# for x in sys.path: -# print(x) - print('pre') - print(dir(ee.formatting)) - print('post') - ee.formatting.eng_str(10) - from ee.formatting import eng_str - - test_cases = [ - 10, - 11, - 12, - 13, - 14, - 15, - 16, - 17, - 18, - 19, - ] - test_cases = [ - 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, - 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, - 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, - 130, 131, 132, 133, 134, 135, 136, 137, 138, 139, - ] - test_cases = [ - [5.5, "5.5"], - [55, "55"], - [550, "550"], - [5500, "5.5 k"], - [55000, "55 k"], - [550000, "550 k"], - [5500000, "5.5 M"], - ] - - for [tc, expected] in test_cases: - actual = eng_str(tc) -# status = if expected == actual: 'PASS' else 'FAIL' - status = '' if expected == actual else 'FAIL' - print("{:5} {:10} => expected={:>10}, actual={:>10}".format(status, tc, expected, actual)) - -# for tc in test_cases: -# print("{:10} => e12={:10}".format(tc, e_series_find_closest(tc))) - -- cgit v1.2.3