Description:
utils/currency_normalization.py converts trade amounts between asset denominations. The behavior when an unrecognised or malformed currency/asset code is passed in isn't covered by tests/test_currency_normalization.py. Contributors extending the normalizer to support new assets need a clear, tested contract for what happens on invalid input (raise, or pass through unchanged with a logged warning).
Acceptance Criteria:
- A new test case in
tests/test_currency_normalization.py passes an unsupported/garbage currency code.
- The test documents and asserts the actual expected behavior (exception type and message, or fallback value).
- If no defined behavior exists yet, add one (a specific exception class) and document it in a short docstring.
make test passes.
Relevant files:
utils/currency_normalization.py, tests/test_currency_normalization.py
Description:
utils/currency_normalization.pyconverts trade amounts between asset denominations. The behavior when an unrecognised or malformed currency/asset code is passed in isn't covered bytests/test_currency_normalization.py. Contributors extending the normalizer to support new assets need a clear, tested contract for what happens on invalid input (raise, or pass through unchanged with a logged warning).Acceptance Criteria:
tests/test_currency_normalization.pypasses an unsupported/garbage currency code.make testpasses.Relevant files:
utils/currency_normalization.py,tests/test_currency_normalization.py