diff --git a/tests/unit_tests/test_cell.py b/tests/unit_tests/test_cell.py index b3c33410c8..9234e7e4b5 100644 --- a/tests/unit_tests/test_cell.py +++ b/tests/unit_tests/test_cell.py @@ -159,7 +159,7 @@ def test_atoms_material_cell(uo2, water): tuples = c.atoms.items() for nuc, atom_num, t in zip(expected_nucs, expected_atoms, tuples): assert nuc == t[0] - assert atom_num == t[1] + assert atom_num == pytest.approx(t[1]) # Change volume and check if OK c.volume = 3.0 diff --git a/tests/unit_tests/test_lib.py b/tests/unit_tests/test_lib.py index 6d8f567bc8..939de8720e 100644 --- a/tests/unit_tests/test_lib.py +++ b/tests/unit_tests/test_lib.py @@ -119,9 +119,9 @@ def test_cell(lib_init): def test_cell_temperature(lib_init): cell = openmc.lib.cells[1] cell.set_temperature(100.0, 0) - assert cell.get_temperature(0) == 100.0 + assert cell.get_temperature(0) == pytest.approx(100.0) cell.set_temperature(200) - assert cell.get_temperature() == 200.0 + assert cell.get_temperature() == pytest.approx(200.0) def test_new_cell(lib_init):