Skip to content

Commit

Permalink
Change build_network_protocol_files.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Quexington committed Nov 4, 2024
1 parent 9030501 commit 7cb72b4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions chia/_tests/util/build_network_protocol_files.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

import os
import subprocess
import sysconfig
import sys
from pathlib import Path
from typing import Any, Callable

Expand Down Expand Up @@ -288,13 +288,11 @@ def main() -> None:
"test_network_protocol_json.py": build_json_test,
}

scripts_path = Path(sysconfig.get_path("scripts"))

for name, function in name_to_function.items():
path = tests_dir.joinpath(name)
path.write_text(function())
subprocess.run(
[scripts_path.joinpath("ruff"), "format", os.fspath(path.relative_to(tests_dir))],
[sys.executable, "-m", "ruff", "format", os.fspath(path.relative_to(tests_dir))],
check=True,
cwd=tests_dir,
)
Expand Down
2 changes: 1 addition & 1 deletion chia/_tests/wallet/test_wallet_coin_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ async def test_get_coin_records_total_count_cache() -> None:
assert (await store.get_coin_records(include_total_count=True)).total_count == 3
# Make sure the total count increases for the same query when rolling back
assert (await store.get_coin_records(include_total_count=True)).total_count == 3
(await store.rollback_to_block(0),)
await store.rollback_to_block(0)
assert (await store.get_coin_records(include_total_count=True)).total_count == 0


Expand Down

0 comments on commit 7cb72b4

Please sign in to comment.