Skip to content

Commit bffc732

Browse files
committed
rename
1 parent 441aed5 commit bffc732

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
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-
info.prover.get_filename_str(),
68+
info.prover.get_filename(),
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({x.prover.get_filename_str(): create_mock_plot(x) for x in list_plots})
80+
self.valid_delta.additions.update({x.prover.get_filename(): 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: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@
4242
class MockDiskProver:
4343
filename: str
4444

45-
def get_filename(self) -> Path:
45+
def get_filepath(self) -> Path:
4646
return Path(self.filename)
4747

48-
def get_filename_str(self) -> str:
48+
def get_filename(self) -> str:
4949
return self.filename
5050

5151

@@ -598,7 +598,7 @@ def assert_cache(expected: list[MockPlotInfo]) -> None:
598598
test_cache.load()
599599
assert len(test_cache) == len(expected)
600600
for plot_info in expected:
601-
assert test_cache.get(Path(plot_info.prover.get_filename())) is not None
601+
assert test_cache.get(Path(plot_info.prover.get_filepath())) is not None
602602

603603
# Modify two entries, with and without memo modification, they both should remain in the cache after load
604604
modify_cache_entry(0, 1500, modify_memo=False)
@@ -617,7 +617,7 @@ def assert_cache(expected: list[MockPlotInfo]) -> None:
617617
# Write the modified cache entries to the file
618618
cache_path.write_bytes(bytes(VersionedBlob(uint16(CURRENT_VERSION), bytes(cache_data))))
619619
# And now test that plots in invalid_entries are not longer loaded
620-
assert_cache([plot_info for plot_info in plot_infos if str(plot_info.prover.get_filename()) not in invalid_entries])
620+
assert_cache([plot_info for plot_info in plot_infos if str(plot_info.prover.get_filepath()) not in invalid_entries])
621621

622622

623623
@pytest.mark.anyio

0 commit comments

Comments
 (0)