mirror of
https://github.com/stijndcl/didier.git
synced 2026-04-07 15:48:29 +02:00
Write some tests for currency crud
This commit is contained in:
parent
8da0eb0b2a
commit
61128dda92
5 changed files with 112 additions and 10 deletions
|
|
@ -48,3 +48,18 @@ def test_abbreviated_float_floors():
|
|||
5.3k is 5300, but 5.3001k is 5300.1
|
||||
"""
|
||||
assert numbers.abbreviated_number("5.3001k") == 5300
|
||||
|
||||
|
||||
def test_abbreviated_all():
|
||||
"""Test abbreviated_number for the 'all' argument"""
|
||||
assert numbers.abbreviated_number("all") == "all"
|
||||
assert numbers.abbreviated_number("ALL") == "all"
|
||||
|
||||
|
||||
def test_abbreviated_empty():
|
||||
"""Test abbreviated_number for empty arguments"""
|
||||
with pytest.raises(ValueError):
|
||||
numbers.abbreviated_number("")
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
numbers.abbreviated_number(None)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue