Skip to content

Commit

Permalink
config
Browse files Browse the repository at this point in the history
  • Loading branch information
samuelduchesne committed Oct 25, 2024
1 parent 0e673bd commit 9a824e0
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
8 changes: 4 additions & 4 deletions tests/test_umi.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class TestUmiTemplate:
"""Test suite for the UmiTemplateLibrary class"""

@pytest.fixture(scope="function")
def two_identical_libraries(self):
def two_identical_libraries(self, config):
"""Yield two identical libraries. Scope of this fixture is `function`."""
file = data_dir / "umi_samples/BostonTemplateLibrary_nodup.json"
yield UmiTemplateLibrary.open(file), UmiTemplateLibrary.open(file)
Expand Down Expand Up @@ -74,7 +74,7 @@ def test_unique_components(self, two_identical_libraries):
# missing S.
c.unique_components("OpaqueMaterial")

def test_graph(self):
def test_graph(self, config):
"""Test initialization of networkx DiGraph"""
file = data_dir / "umi_samples/BostonTemplateLibrary_2.json"

Expand All @@ -86,7 +86,7 @@ def test_graph(self):
G = a.to_graph(include_orphans=True)
assert len(G) > n_nodes

def test_template_to_template(self):
def test_template_to_template(self, config):
"""load the json into UmiTemplateLibrary object, then convert back to json and
compare"""

Expand Down Expand Up @@ -160,7 +160,7 @@ def read_json(file):
return data_dict

@pytest.fixture()
def idf(self):
def idf(self, config):
yield IDF(prep_outputs=False)

@pytest.fixture()
Expand Down
14 changes: 7 additions & 7 deletions tests/test_zonegraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def test_traverse_graph(self, small_office):
assert G

@pytest.fixture(scope="class")
def G(self, config, small_office):
def G(self, small_office):
"""
Args:
config:
Expand All @@ -40,7 +40,7 @@ def G(self, config, small_office):
yield ZoneGraph.from_idf(idf)

@pytest.mark.parametrize("adj_report", [True, False])
def test_graph(self, config, small_office, adj_report):
def test_graph(self, small_office, adj_report):
"""Test the creation of a BuildingTemplate zone graph. Parametrize the
creation of the adjacency report
Expand All @@ -61,15 +61,15 @@ def test_graph(self, config, small_office, adj_report):
EpBunch,
)

def test_graph_info(self, config, G):
def test_graph_info(self, G):
"""test the info method on a ZoneGraph
Args:
G:
"""
G.info()

def test_viewgraph2d(self, config, G):
def test_viewgraph2d(self, G):
"""test the visualization of the zonegraph in 2d
Args:
Expand All @@ -92,7 +92,7 @@ def test_viewgraph2d(self, config, G):
)

@pytest.mark.parametrize("annotate", [True, "Name", ("core", None)])
def test_viewgraph3d(self, config, G, annotate):
def test_viewgraph3d(self, G, annotate):
"""test the visualization of the zonegraph in 3d
Args:
Expand All @@ -106,7 +106,7 @@ def test_viewgraph3d(self, config, G, annotate):
show=False,
)

def test_core_graph(self, config, G):
def test_core_graph(self, G):
"""
Args:
G:
Expand All @@ -116,7 +116,7 @@ def test_core_graph(self, config, G):
assert len(H) == 1 # assert G has no nodes since Warehouse does not have a
# core zone

def test_perim_graph(self, config, G):
def test_perim_graph(self, G):
"""
Args:
G:
Expand Down

0 comments on commit 9a824e0

Please sign in to comment.