Skip to content

Commit a60f326

Browse files
committed
Make --result-log compatible with Windows and turn it off by default
1 parent aa7cb1c commit a60f326

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/geltest/_internal/cli.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -166,7 +166,6 @@ def _parse_key_value(
166166
"%TIMESTAMP%, it will be replaced by ISO8601 date and time. "
167167
"Empty string means not to write the log at all."
168168
),
169-
default="build/test-results/%TIMESTAMP%.json",
170169
)
171170
@click.option(
172171
"--include-unsuccessful",

src/geltest/_internal/results.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,8 @@ def render_result(file: TextIO, result: TestResult) -> None:
299299

300300

301301
def _result_log_path(path_template: str) -> pathlib.Path | None:
302-
now = str(datetime.datetime.now(datetime.timezone.utc)).replace(" ", "_")
302+
ts = datetime.datetime.now(datetime.timezone.utc)
303+
now = ts.isoformat(sep="T", timespec="seconds").replace(":", "-")
303304
path = pathlib.Path(path_template.replace("%TIMESTAMP%", now))
304305

305306
parent_dir = path.parent

0 commit comments

Comments
 (0)