Skip to content

Commit 7811dbb

Browse files
committed
add get_filename_str to mock
1 parent 6e28f8c commit 7811dbb

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

chia/_tests/plot_sync/test_plot_sync.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ class ExpectedResult:
6565
def add_valid(self, list_plots: list[MockPlotInfo]) -> None:
6666
def create_mock_plot(info: MockPlotInfo) -> Plot:
6767
return Plot(
68-
str(info.prover.get_filename()),
68+
info.prover.get_filename_str(),
6969
uint8(0),
7070
bytes32.zeros,
7171
None,
@@ -77,7 +77,7 @@ def create_mock_plot(info: MockPlotInfo) -> Plot:
7777
)
7878

7979
self.valid_count += len(list_plots)
80-
self.valid_delta.additions.update({str(x.prover.get_filename()): create_mock_plot(x) for x in list_plots})
80+
self.valid_delta.additions.update({x.prover.get_filename_str(): create_mock_plot(x) for x in list_plots})
8181

8282
def remove_valid(self, list_paths: list[Path]) -> None:
8383
self.valid_count -= len(list_paths)

chia/_tests/plotting/test_plot_manager.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ class MockDiskProver:
4545
def get_filename(self) -> Path:
4646
return Path(self.filename)
4747

48+
def get_filename_str(self) -> str:
49+
return self.filename
50+
4851

4952
@dataclass
5053
class MockPlotInfo:

0 commit comments

Comments
 (0)