コード例 #1
0
ファイル: test_wire.py プロジェクト: BetaPollux/EMToolbox
def test_offset_zero():
    a = Wire(1, 2, 0.5)
    assert a.offset(1, 2) == approx(0)
コード例 #2
0
ファイル: test_wire.py プロジェクト: BetaPollux/EMToolbox
def test_offset():
    a = Wire(1, 1, 0.5)
    assert a.offset() == approx(np.sqrt(2))