Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chaoming0625 committed Aug 23, 2024
1 parent d456f0e commit ab76554
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions brainunit/_base_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_inplace_operations(self):
inplace_op(volt)

def test_display(self):
assert_equal(str(bu.kmeter / bu.meter), 'Unit(1000.0)')
assert_equal(str(bu.kmeter / bu.meter), 'Unit(10.0^3)')


class TestQuantity(unittest.TestCase):
Expand Down Expand Up @@ -243,9 +243,8 @@ def test_display(self):
assert_equal(display_in_unit(10. * mV, ohm * amp), "0.01 * volt")
with pytest.raises(bu.UnitMismatchError):
display_in_unit(10 * nS, ohm)
assert_equal(display_in_unit(10.0, Unit(scale=1)), "1. * Unit(10.0)")

assert_equal(display_in_unit(3 * bu.kmeter / bu.meter), '3. * Unit(1000.0)')
assert_equal(display_in_unit(10.0, Unit(scale=1)), "1. * Unit(10.0^1)")
assert_equal(display_in_unit(3 * bu.kmeter / bu.meter), '3. * Unit(10.0^3)')

def test_display2(self):

Expand Down

0 comments on commit ab76554

Please sign in to comment.