Skip to content

Commit

Permalink
fixup! Add PipelineGraph package.
Browse files Browse the repository at this point in the history
  • Loading branch information
TallJimbo committed Jul 24, 2023
1 parent 8540c17 commit 6e51e83
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions tests/test_pipeline_graph.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,8 @@ def setUp(self) -> None:

def test_unresolved_accessors(self) -> None:
"""Test attribute accessors, iteration, and simple methods on a graph
that has not had `PipelineGraph.resolve` called on it."""
that has not had `PipelineGraph.resolve` called on it.
"""
self.check_base_accessors(self.graph)
self.assertEqual(
repr(self.graph.tasks["a"]), "a (lsst.pipe.base.tests.mocks.DynamicTestPipelineTask)"
Expand All @@ -120,7 +121,8 @@ def test_sorting(self) -> None:

def test_unresolved_xgraph_export(self) -> None:
"""Test exporting an unresolved PipelineGraph to networkx in various
ways."""
ways.
"""
self.check_make_xgraph(self.graph, resolved=False)
self.check_make_bipartite_xgraph(self.graph, resolved=False)
self.check_make_task_xgraph(self.graph, resolved=False)
Expand Down Expand Up @@ -182,7 +184,8 @@ def test_resolved_accessors(self) -> None:

def test_resolved_xgraph_export(self) -> None:
"""Test exporting a resolved PipelineGraph to networkx in various
ways."""
ways.
"""
self.graph.resolve(MockRegistry(self.dimensions, {}))
self.check_make_xgraph(self.graph, resolved=True)
self.check_make_bipartite_xgraph(self.graph, resolved=True)
Expand Down Expand Up @@ -249,8 +252,8 @@ def test_resolved_copies(self) -> None:
self.check_make_xgraph(copy3, resolved=True)

def check_base_accessors(self, graph: PipelineGraph) -> None:
"""Implementation for test methods that check attribute access,
iteration, and simple methods.
"""Run parameterized tests that check attribute access, iteration, and
simple methods.
The given graph must be unchanged from the one defined in `setUp`,
other than sorting.
Expand Down

0 comments on commit 6e51e83

Please sign in to comment.