Skip to content

Commit 8cc5577

Browse files
committed
refactor: make fake graph config's picklable
1 parent 0a19b4f commit 8cc5577

File tree

1 file changed

+6
-2
lines changed
  • packages/pytest-taskgraph/src/pytest_taskgraph/fixtures

1 file changed

+6
-2
lines changed

packages/pytest-taskgraph/src/pytest_taskgraph/fixtures/gen.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,13 @@ def _load_kinds(self, graph_config, target_kind=None):
6262
yield FakeKind(kind_name, "/fake", config, graph_config)
6363

6464

65+
class FakeGraphConfig(GraphConfig):
66+
def register(self):
67+
pass
68+
69+
6570
def fake_load_graph_config(root_dir):
66-
graph_config = GraphConfig(
71+
graph_config = FakeGraphConfig(
6772
{
6873
"trust-domain": "test-domain",
6974
"taskgraph": {
@@ -103,7 +108,6 @@ def fake_load_graph_config(root_dir):
103108
},
104109
root_dir,
105110
)
106-
graph_config.__dict__["register"] = lambda: None
107111
return graph_config
108112

109113

0 commit comments

Comments
 (0)