Skip to content

Commit

Permalink
single edge
Browse files Browse the repository at this point in the history
  • Loading branch information
colltoaction committed Aug 26, 2024
1 parent c2e7b3d commit 39f68c7
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 0 deletions.
4 changes: 4 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,10 @@ def empty():
def single_node():
return json.load(open(f"{json_dir}/single_node.json", "r"))

@pytest.fixture
def single_edge():
return json.load(open(f"{json_dir}/single_edge.json", "r"))

@pytest.fixture
def bad_top_level_field():
return json.load(open(f"{json_dir}/bad_top_level_field.json", "r"))
Expand Down
1 change: 1 addition & 0 deletions tests/test_files/single_edge.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"incidences": [], "edges": [ { "edge": 3 } ]}
4 changes: 4 additions & 0 deletions tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ def test_single_node(validator, single_node):
validator(single_node)


def test_single_edge(validator, single_edge):
validator(single_edge)


def test_metadata_as_list(validator, metadata_as_list):
with pytest.raises(ValueError):
validator(metadata_as_list)
Expand Down

0 comments on commit 39f68c7

Please sign in to comment.