Skip to content

Add test for unsupported currency code handling in currency normalization #678

Description

@Inkman007

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions