Skip to content

Commit

Permalink
Merge branch 'global_data4' into global_data_new
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian-B committed Dec 9, 2021
2 parents 765404c + 52d89a5 commit fabb58b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pacman/data/pacman_data_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,12 @@ def get_graph(self):
def get_machine_graph(self):
return self.__pacman_data._machine_graph

def get_runtime_graph(self):
return self.__pacman_data._runtime_graph

def get_runtime_machine_graph(self):
return self.__pacman_data._runtime_machine_graph

def create_graphs(self, graph_label):
"""
Creates the user/ original graphs based on the label
Expand Down
9 changes: 9 additions & 0 deletions unittests/data/test_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ def test_graphs(self):
writer.runtime_graph
with self.assertRaises(DataLocked):
writer.runtime_machine_graph()
# the writer still has access to the runtime graphs
writer.get_runtime_graph()
writer.get_runtime_machine_graph()

writer.start_run()
writer.runtime_graph
Expand All @@ -89,6 +92,9 @@ def test_graphs(self):
writer.runtime_graph
with self.assertRaises(DataLocked):
writer.runtime_machine_graph()
# the writer still has access to the runtime graphs
writer.get_runtime_graph()
writer.get_runtime_machine_graph()

writer.stopping()
writer.runtime_graph
Expand All @@ -109,6 +115,9 @@ def test_graphs(self):
writer.runtime_graph
with self.assertRaises(DataLocked):
writer.runtime_machine_graph()
# the writer still has access to the runtime graphs
writer.get_runtime_graph()
writer.get_runtime_machine_graph()

def test_graph_support(self):
view = PacmanDataView()
Expand Down

0 comments on commit fabb58b

Please sign in to comment.