Skip to content

Commit

Permalink
refactor(fw): use std lib's configparser for properties file
Browse files Browse the repository at this point in the history
  • Loading branch information
danceratopz committed Jun 13, 2024
1 parent ffabf64 commit 51e4e68
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions src/pytest_plugins/test_filler/test_filler.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
writes the generated fixtures to file.
"""

import configparser
import datetime
import os
import tarfile
Expand Down Expand Up @@ -548,10 +549,12 @@ def create_properties_file(request, output_dir: Path) -> None:
if github_sha := os.getenv("GITHUB_SHA"):
properties["commit"] = github_sha
properties["solc_version"] = request.config.solc_version

config = configparser.ConfigParser()
config["FIXTURES"] = properties
properties_filename = output_dir / "fixtures.properties"
with open(properties_filename, "w") as file:
for key, value in properties.items():
file.write(f"{key}={value}\n")
with open(properties_filename, "w") as f:
config.write(f)


@pytest.fixture(scope="session", autouse=True)
Expand Down

0 comments on commit 51e4e68

Please sign in to comment.