Skip to content

Commit

Permalink
Add a format code test for int_property
Browse files Browse the repository at this point in the history
  • Loading branch information
scasagrande committed Dec 26, 2015
1 parent b8b7c5e commit 437fd0d
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions instruments/instruments/tests/test_property_factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,6 +431,15 @@ class IntMock(MockInstrument):
mock_inst = IntMock({'MOCK?':'1'})

eq_(mock_inst.int_property, 1)

def test_int_property_format_code():
class IntMock(MockInstrument):
int_property = int_property('MOCK', format_code='{:e}')

mock_inst = IntMock()

mock_inst.int_property = 1
eq_(mock_inst.value, 'MOCK {:e}\n'.format(1))

## Unitful Property ##

Expand Down

0 comments on commit 437fd0d

Please sign in to comment.