1
0
fin-defs/test/test_currency.py
Jon Michael Aanes a322770205
All checks were successful
Python Ruff Code Quality / ruff (push) Successful in 22s
Run Python tests (through Pytest) / Test (push) Successful in 25s
Verify Python project can be installed, loaded and have version checked / Test (push) Successful in 22s
Code quality
2024-10-27 17:26:03 +01:00

11 lines
278 B
Python

import fin_defs
def test_from_currency_symbol():
assert fin_defs.FiatCurrency.from_currency_symbol('$') == fin_defs.USD
assert fin_defs.FiatCurrency.from_currency_symbol('TEST') is None
def test_currency_symbol():
assert fin_defs.USD.to_currency_symbol() == '$'