diff --git a/setup.py b/setup.py index 6165230..86c326b 100755 --- a/setup.py +++ b/setup.py @@ -92,7 +92,7 @@ setup( CMakeExtension('storage', subdir='storage'), CMakeExtension('utility', subdir='utility') ], - cmdclass=dict(build_ext=CMakeBuild, test=PyTest), + cmdclass={'build_ext': CMakeBuild, 'test': PyTest}, zip_safe=False, tests_require=['pytest'], ) diff --git a/tests/storage/test_bitvector.py b/tests/storage/test_bitvector.py index e21bc8c..adcfdac 100644 --- a/tests/storage/test_bitvector.py +++ b/tests/storage/test_bitvector.py @@ -19,24 +19,24 @@ class TestBitvector: bit = stormpy.BitVector(5, [2, 3]) assert bit.size() == 5 assert bit.number_of_set_bits() == 2 - assert bit.get(0) == False - assert bit.get(1) == False - assert bit.get(2) == True - assert bit.get(3) == True - assert bit.get(4) == False + assert bit.get(0) is False + assert bit.get(1) is False + assert bit.get(2) is True + assert bit.get(3) is True + assert bit.get(4) is False def test_init_bitvector(self): bit = stormpy.BitVector(7, [0, 6]) bit2 = stormpy.BitVector(bit) assert bit == bit2 - assert bit2.get(0) == True - assert bit2.get(6) == True + assert bit2.get(0) is True + assert bit2.get(6) is True def test_negate(self): bit = stormpy.BitVector(7, [0, 6]) bit2 = stormpy.BitVector(bit) bit = ~bit - assert bit.get(0) == False - assert bit.get(6) == False + assert bit.get(0) is False + assert bit.get(6) is False for i in range(bit.size()): assert bit.get(i) is not bit2.get(i) diff --git a/tests/storage/test_model_instantiator.py b/tests/storage/test_model_instantiator.py index de6aae9..7e22fd2 100644 --- a/tests/storage/test_model_instantiator.py +++ b/tests/storage/test_model_instantiator.py @@ -11,12 +11,11 @@ class TestModel: model = stormpy.build_parametric_model(program, formulas) parameters = model.collect_probability_parameters() instantiator = stormpy.ModelInstantiator(model) - point = dict() - for p in parameters: - point[p] = 0.4 + + point = {p: 0.4 for p in parameters} instantiated_model = instantiator.instantiate(point) assert instantiated_model.nr_states == model.nr_states assert not instantiated_model.has_parameters - for p in parameters: - point[p] = 0.5 - instatiated_model2 = instantiator.instantiate(point) + + point = {p: 0.5 for p in parameters} + instantiated_model2 = instantiator.instantiate(point)