summaryrefslogtreecommitdiff
path: root/tests/test_numbers.py
diff options
context:
space:
mode:
authorAarni Koskela <akx@iki.fi>2023-01-18 20:27:44 +0200
committerAarni Koskela <akx@iki.fi>2023-01-18 21:20:51 +0200
commit82d345a66e850f643607ac9fcafd9b9a2a89d1e1 (patch)
treead66b7a13fb05f30628b6710dacab554505d55e8 /tests/test_numbers.py
parentcb0269fc63f5af4ade770f7a8872de8090bf697d (diff)
downloadbabel-82d345a66e850f643607ac9fcafd9b9a2a89d1e1.tar.gz
Apply some small miscellaneous formatting fixes
Diffstat (limited to 'tests/test_numbers.py')
-rw-r--r--tests/test_numbers.py22
1 files changed, 11 insertions, 11 deletions
diff --git a/tests/test_numbers.py b/tests/test_numbers.py
index a6f79f0..04a1865 100644
--- a/tests/test_numbers.py
+++ b/tests/test_numbers.py
@@ -167,6 +167,7 @@ class FormatDecimalTestCase(unittest.TestCase):
assert numbers.format_compact_decimal(1000, locale='fr', format_type='long') == 'mille'
assert numbers.format_compact_decimal(1234, locale='fr', format_type='long') == '1 millier'
+
class NumberParsingTestCase(unittest.TestCase):
def test_can_parse_decimals(self):
@@ -231,15 +232,15 @@ def test_validate_currency():
def test_is_currency():
- assert is_currency('EUR') is True
- assert is_currency('eUr') is False
- assert is_currency('FUU') is False
- assert is_currency('') is False
- assert is_currency(None) is False
- assert is_currency(' EUR ') is False
- assert is_currency(' ') is False
- assert is_currency([]) is False
- assert is_currency(set()) is False
+ assert is_currency('EUR')
+ assert not is_currency('eUr')
+ assert not is_currency('FUU')
+ assert not is_currency('')
+ assert not is_currency(None)
+ assert not is_currency(' EUR ')
+ assert not is_currency(' ')
+ assert not is_currency([])
+ assert not is_currency(set())
def test_normalize_currency():
@@ -451,8 +452,7 @@ def test_format_compact_currency():
def test_format_compact_currency_invalid_format_type():
with pytest.raises(numbers.UnknownCurrencyFormatError):
- numbers.format_compact_currency(1099.98, 'USD', locale='en_US',
- format_type='unknown')
+ numbers.format_compact_currency(1099.98, 'USD', locale='en_US', format_type='unknown')
@pytest.mark.parametrize('input_value, expected_value', [