Skip to content

Commit

Permalink
fixed test errors
Browse files Browse the repository at this point in the history
  • Loading branch information
nh916 committed Sep 22, 2023
1 parent 75ee1a8 commit 119f729
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tests/nodes/primary_nodes/test_collection.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_create_complex_collection(simple_experiment_node, simple_inventory_node
assert my_collection.inventory == [simple_inventory_node]
assert my_collection.doi == my_cript_doi
assert my_collection.citation == [complex_citation_node]
assert my_collection.my_collection_notes == my_collection_notes
assert my_collection.notes == my_collection_notes


def test_collection_getters_and_setters(simple_experiment_node, simple_inventory_node, complex_citation_node) -> None:
Expand Down
5 changes: 3 additions & 2 deletions tests/nodes/primary_nodes/test_computation.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,21 @@ def test_create_simple_computation_node() -> None:
"""
my_computation_type = "analysis"
my_computation_name = "this is my computation name"
my_computation_notes = "this is my computation notes"

my_computation_node = cript.Computation(name=my_computation_name, type=my_computation_type)

# assertions
assert isinstance(my_computation_node, cript.Computation)
assert my_computation_node.name == my_computation_name
assert my_computation_node.type == my_computation_type
assert my_computation_node.notes == my_computation_notes


def test_create_complex_computation_node(simple_data_node, complex_software_configuration_node, complex_condition_node, simple_computation_node, complex_citation_node) -> None:
"""
test that a complex computation node with all possible arguments can be created
"""
my_computation_type = "analysis"
my_computation_notes = "this is my computation notes"

citation = copy.deepcopy(complex_citation_node)
condition = copy.deepcopy(complex_condition_node)
Expand All @@ -44,6 +43,7 @@ def test_create_complex_computation_node(simple_data_node, complex_software_conf
condition=[condition],
prerequisite_computation=simple_computation_node,
citation=[citation],
notes=my_computation_notes,
)

# assertions
Expand All @@ -55,6 +55,7 @@ def test_create_complex_computation_node(simple_data_node, complex_software_conf
assert my_computation_node.condition == [condition]
assert my_computation_node.prerequisite_computation == simple_computation_node
assert my_computation_node.citation == [citation]
assert my_computation_node.notes == my_computation_notes


def test_computation_type_invalid_vocabulary() -> None:
Expand Down
2 changes: 1 addition & 1 deletion tests/nodes/primary_nodes/test_material.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ def test_create_complex_material(simple_material_node, simple_computational_forc

my_property = [cript.Property(key="modulus_shear", type="min", value=1.23, unit="gram")]

my_material = cript.Material(name=material_name, identifier=identifier, keyword=keyword, component=component, process=simple_process_node, property=my_property, computational_forcefield=forcefield)
my_material = cript.Material(name=material_name, identifier=identifier, keyword=keyword, component=component, process=simple_process_node, property=my_property, computational_forcefield=forcefield, notes=material_notes)

assert isinstance(my_material, cript.Material)
assert my_material.name == material_name
Expand Down

0 comments on commit 119f729

Please sign in to comment.