44 lines
927 B
Python
44 lines
927 B
Python
from pdme.model import Model
|
|
from pdme.measurement import DotMeasurement
|
|
import pytest
|
|
|
|
|
|
def test_model_interface_not_implemented_point_length():
|
|
model = Model()
|
|
with pytest.raises(NotImplementedError):
|
|
model.point_length()
|
|
|
|
|
|
def test_model_interface_not_implemented_point_n():
|
|
model = Model()
|
|
with pytest.raises(NotImplementedError):
|
|
model.n()
|
|
|
|
|
|
def test_model_interface_not_implemented_cost():
|
|
model = Model()
|
|
|
|
model.point_length = lambda: 2
|
|
|
|
with pytest.raises(NotImplementedError):
|
|
cost = model.costs([DotMeasurement(0, [1, 2, 3], 4)])
|
|
cost([1, 2])
|
|
|
|
|
|
def test_model_interface_not_implemented_one_dipoles():
|
|
model = Model()
|
|
|
|
model.point_length = lambda: 2
|
|
|
|
with pytest.raises(NotImplementedError):
|
|
model.get_dipoles(5)
|
|
|
|
|
|
def test_model_interface_not_implemented_n_dipoles():
|
|
model = Model()
|
|
|
|
model.point_length = lambda: 2
|
|
|
|
with pytest.raises(NotImplementedError):
|
|
model.get_n_single_dipoles(5, 10)
|