def test_set_id(self): t = Track() nose.tools.assert_equal(t.id, 0) t.id = 2 nose.tools.assert_equal(t.id, 2) t.id = 1345634 nose.tools.assert_equal(t.id, 1345634)
def test_set_id(self): t = Track() nose.tools.assert_equal(t.id, 0) t.id = 2 nose.tools.assert_equal(t.id, 2) t.id = 1345634 nose.tools.assert_equal(t.id, 1345634) # Shouldn't be able to set floats def set(): t.id = 1.5 nose.tools.assert_raises(ctypes.ArgumentError, set)