Skip to content

Commit

Permalink
add tests for deprecated material construction
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Jul 10, 2021
1 parent fbd13a8 commit dcc861e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions tests/emmet-core/vasp/test_materials.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,18 @@ def test_make_mat(test_tasks):
MaterialsDoc.from_tasks(bad_task_group, use_statics=False)


def test_make_deprecated_mat(test_tasks):
bad_task_group = [
task for task in test_tasks if task.task_type != TaskType.Structure_Optimization
]

material = MaterialsDoc.construct_deprecated_material(bad_task_group)

assert material.deprecated
assert material.formula_pretty == "Si"
assert len(material.task_ids) == 3
assert material.entries is None


def test_schema():
MaterialsDoc.schema()

0 comments on commit dcc861e

Please sign in to comment.