|
14 | 14 | from ethereum_test_base_types.base_types import Bytes, Hash |
15 | 15 | from ethereum_test_base_types.pydantic import CamelModel |
16 | 16 | from ethereum_test_forks import Cancun, Fork, Osaka, Prague |
| 17 | +from pytest_plugins.logging import get_logger |
17 | 18 |
|
18 | 19 | CACHED_BLOBS_DIRECTORY: Path = ( |
19 | 20 | Path(platformdirs.user_cache_dir("ethereum-execution-spec-tests")) / "cached_blobs" |
20 | 21 | ) |
| 22 | +logger = get_logger(__name__) |
21 | 23 |
|
22 | 24 |
|
23 | 25 | def clear_blob_cache(cached_blobs_folder_path: Path): |
@@ -220,7 +222,7 @@ def get_cells(fork: Fork, data: Bytes) -> List[Bytes] | None: |
220 | 222 | # if this blob already exists then load from file |
221 | 223 | blob_location: Path = Blob.get_filepath(fork, seed) |
222 | 224 | if blob_location.exists(): |
223 | | - print(f"Blob exists already, reading it from file {blob_location}") |
| 225 | + logger.debug(f"Blob exists already, reading it from file {blob_location}") |
224 | 226 | return Blob.from_file(Blob.get_filename(fork, seed)) |
225 | 227 |
|
226 | 228 | assert fork.supports_blobs(), f"Provided fork {fork.name()} does not support blobs!" |
@@ -289,7 +291,7 @@ def write_to_file(self): |
289 | 291 |
|
290 | 292 | # warn if existing static_blob gets overwritten |
291 | 293 | if output_location.exists(): |
292 | | - print(f"Blob {output_location} already exists. It will be overwritten.") |
| 294 | + logger.debug(f"Blob {output_location} already exists. It will be overwritten.") |
293 | 295 |
|
294 | 296 | with open(output_location, "w", encoding="utf-8") as f: # overwrite existing |
295 | 297 | f.write(json_str) |
|
0 commit comments