From d2e5f0a12bd9d2ee78e1120f686ba8f396a13898 Mon Sep 17 00:00:00 2001 From: Takuya Wakazono Date: Tue, 14 Oct 2025 22:29:16 +0900 Subject: [PATCH] fix: add compatibility with older python versions for clock::now PEP 515 (Underscores in Numeric Literals) is supported only in Python 3.6+. --- CHANGELOG.md | 1 + src/clock.sh | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 237eaafc..b463566c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ## Unreleased - Fix bench tests missing test_file var +- Fix compatibility with older python versions for clock::now ## [0.25.0](https://github.com/TypedDevs/bashunit/compare/0.23.0...0.24.0) - 2025-10-05 diff --git a/src/clock.sh b/src/clock.sh index 27aed6cf..f0153aeb 100644 --- a/src/clock.sh +++ b/src/clock.sh @@ -76,7 +76,7 @@ function clock::now() { python) python - <<'EOF' import time, sys -sys.stdout.write(str(int(time.time() * 1_000_000_000))) +sys.stdout.write(str(int(time.time() * 1000000000))) EOF ;; node)