Skip to content

Commit

Permalink
add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lmmentel committed Jan 3, 2025
1 parent 827544e commit 3c1a293
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tests/test_element.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,14 +101,14 @@ def test__ne__():
assert e1 != e2


@pytest.mark.parametrize("e", ELEMENTS)
def test_melting_points_float_or_none(e):
assert isinstance(e.melting_point, (float, type(None)))
@pytest.mark.parametrize("element_obj", ELEMENTS)
def test_melting_points_float_or_none(element_obj):
assert isinstance(element_obj.melting_point, (float, type(None)))


@pytest.mark.parametrize("e", ELEMENTS)
def test_boiling_points_float_or_none(e):
assert isinstance(e.boiling_point, (float, type(None)))
@pytest.mark.parametrize("element_obj", ELEMENTS)
def test_boiling_points_float_or_none(element_obj):
assert isinstance(element_obj.boiling_point, (float, type(None)))


@pytest.mark.parametrize("element_obj", ELEMENTS)
Expand All @@ -130,3 +130,8 @@ def test_protons(element_obj):
@pytest.mark.parametrize("element_obj", ELEMENTS)
def test_electrons(element_obj):
assert element_obj.electrons == element_obj.atomic_number


@pytest.mark.parametrize("element_obj", ELEMENTS)
def test_price_per_kg_float_or_none(element_obj):
assert isinstance(element_obj.price_per_kg, (float, type(None)))

0 comments on commit 3c1a293

Please sign in to comment.