Skip to content

API does not handle negative values #29

Open
@sigrist

Description

@sigrist

The API does not handle negative values:

from price_parser import Price
def test_price_parser():
    value = Price.fromstring("R$ 1,00")
    assert value.amount_float == 1.0

    value = Price.fromstring("R$ -2,00")
    assert value.amount_float == -2.0 # Fails

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions