Skip to content

Commit c793edb

Browse files
committed
BUGFIX: Fix tests to reflect bugfix for the subts command
1 parent a91f309 commit c793edb

3 files changed

Lines changed: 5 additions & 5 deletions

File tree

src/time_tools/common/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
#
88
# global variables
99
progname = "time-tools"
10-
progver = "0.3"
10+
progver = "0.3.1"

src/time_tools/ts_to_iso_utc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929

3030
# global variables
3131
my_progname = "ts_to_iso_utc"
32-
my_progver = "4"
32+
my_progver = "5"
3333
progname = my_progname + " (" + version.progname + ")"
3434
progver = version.progver + "-" + my_progver
3535
ERR.verbosity = 0
@@ -60,7 +60,7 @@ def parse_args() -> argparse.Namespace:
6060
parser_subts = subparsers.add_parser('subts', help='subtract: timestamp - timestamp -> seconds')
6161
parser_subts.add_argument('ts_younger', type=str, help='timestamp to subtract from')
6262
parser_subts.add_argument('ts_older', type=str, help='subtractor')
63-
parser_subts.add_argument('-r', '--human-readable', action='store_true', help='return hours, minutes and seconds instead of just seconds')
63+
parser_subts.add_argument('-r', '--human-readable', action='store_true', help='return days, hours, minutes and seconds instead of just seconds')
6464
# create the parser for "subsecs"
6565
parser_subsecs = subparsers.add_parser('subsecs', help='subtract: timestamp - seconds -> timestamp')
6666
parser_subsecs.add_argument('ts', type=str, help='timestamp to subtract from')

test/test_lib.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def test_ts_to_iso_utc_subts(self):
7171
ts_newer = "2025 Nov 26 09:12:30 CEST"
7272
expected_result = "126220470.0"
7373
p = subprocess.run(
74-
["python3", os.path.join("src", "time_tools", "ts_to_iso_utc.py"), "subts", ts_older, ts_newer],
74+
["python3", os.path.join("src", "time_tools", "ts_to_iso_utc.py"), "subts", ts_newer, ts_older],
7575
capture_output=True,
7676
text=True,
7777
check=True,
@@ -81,7 +81,7 @@ def test_ts_to_iso_utc_subts(self):
8181
assert p.stdout.strip() == expected_result
8282
try:
8383
p = subprocess.run(
84-
["python3", os.path.join("src", "time_tools", "ts_to_iso_utc.py"), "subts", ts_newer, ts_older],
84+
["python3", os.path.join("src", "time_tools", "ts_to_iso_utc.py"), "subts", ts_older, ts_newer],
8585
capture_output=True,
8686
text=True,
8787
check=True,

0 commit comments

Comments
 (0)