Skip to content

Commit

Permalink
simple test for validation builder
Browse files Browse the repository at this point in the history
  • Loading branch information
shyamd committed Oct 20, 2020
1 parent 4958255 commit 1847bb1
Showing 1 changed file with 23 additions and 0 deletions.
23 changes: 23 additions & 0 deletions tests/emmet-builders/test_vasp.py
@@ -0,0 +1,23 @@
import pytest
from maggma.stores import JSONStore, MemoryStore
from emmet.builders.vasp.task_validator import TaskValidator


intermediate_stores = ["validation"]


@pytest.fixture(scope="session")
def tasks_store(test_dir):
return JSONStore(test_dir / "test_si_tasks.json.gz")


@pytest.fixture(scope="session")
def validation_store():
return MemoryStore()


def test_validator(tasks_store, validation_store):
builder = TaskValidator(tasks=tasks_store, task_validation=validation_store)
builder.run()
assert validation_store.count() == tasks_store.count()
assert validation_store.count({"valid": True}) == tasks_store.count()

0 comments on commit 1847bb1

Please sign in to comment.