Пример #1
0
 def test_value_error(self):
     "Test GeneralWire raise ValueError when argument t1>t2"
     with pytest.raises(ValueError):
         gw_cw = GeneralWire(lambda t: [0, 0, t], 2, 1, 1.0 * u.A)
Пример #2
0
 def test_not_callable(self):
     "Test that `GeneralWire` raises `ValueError` if its first argument is not callable"
     with pytest.raises(ValueError):
         GeneralWire("wire", 0, 1, 1 * u.A)