@@ -109,12 +109,14 @@ def test_eq_zero(mapping, expected):
({'USD': -10, 'EUR': -20}, False),
({'JPY': 10}, True),
({'JPY': 10, 'BRL': 0}, True),
({'JPY': 10, 'BRL': 20}, True),
({'USD': '0.00015'}, True),
({'EUR': '-0.00052'}, True),
({'RUB': core.Balance.TOLERANCE}, True),
({'RUB': -core.Balance.TOLERANCE}, False),
])
def test_ge_zero(mapping, expected):
balance = core.Balance(amounts_from_map(mapping))
assert balance.ge_zero() == expected
@pytest.mark.parametrize('mapping,expected', [
@@ -126,12 +128,14 @@ def test_ge_zero(mapping, expected):
({'USD': -10, 'EUR': -20}, True),
({'JPY': 10}, False),
({'JPY': 10, 'BRL': 0}, False),
({'JPY': 10, 'BRL': 20}, False),
({'RUB': core.Balance.TOLERANCE}, False),
({'RUB': -core.Balance.TOLERANCE}, True),
def test_le_zero(mapping, expected):
assert balance.le_zero() == expected
@pytest.mark.parametrize('mapping', [