Skip to content

Commit d8c4663

Browse files
committed
test: Fix timestamp test data and rename misleading test function
1 parent d99bdab commit d8c4663

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

tests/unit/report/test_hwpc_report.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ def test_create_hwpc_report_from_json_with_datetime_timestamp_format_create_a_HW
5353

5454
def test_create_hwpc_report_from_json_with_str_timestamp_with_bad_format_raise_BadInputData():
5555
json_input = extract_rapl_reports_with_2_sockets(1)[0]
56-
json_input['timestamp'] = '1970-09-01T090909.543'
56+
json_input['timestamp'] = '1970-09-01T0909099.543'
5757
with pytest.raises(BadInputData):
5858
_ = HWPCReport.from_json(json_input)
5959

tests/unit/report/test_power_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def test_create_power_report_from_json_with_datetime_timestamp_format_create_a_P
7676

7777
def test_create_power_report_from_json_with_str_timestamp_with_bad_format_raise_BadInputData():
7878
json_input = gen_json_power_report(1)[0]
79-
json_input['timestamp'] = '1970-09-01T090909.543'
79+
json_input['timestamp'] = '1970-09-01T0909099.543'
8080
with pytest.raises(BadInputData):
8181
_ = PowerReport.from_json(json_input)
8282

@@ -112,7 +112,7 @@ def test_create_power_report_from_csv_with_one_lines_create_an_power_report():
112112
def test_create_power_report_from_csv_with_bad_timestamp_format_raise_BadInputData():
113113
csv_lines = [("power",
114114
{
115-
"timestamp": '1970-09-01T090909.543',
115+
"timestamp": '1970-09-01T0909099.543',
116116
"sensor": "formula_group",
117117
"target": "all",
118118
"power": 42

tests/unit/report/test_procfs_report.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_create_procfs_report_from_json_with_str_timestamp_with_bad_format_raise
6161
procfs_timeline,
6262
):
6363
json_input = gen_json_procfs_report(1, procfs_timeline[0])[0]
64-
json_input["timestamp"] = "1970-09-01T090909.543"
64+
json_input["timestamp"] = "1970-09-01T0909099.543"
6565
with pytest.raises(BadInputData):
6666
_ = ProcfsReport.from_json(json_input)
6767

@@ -141,7 +141,7 @@ def test_create_procfs_report_from_csv_with_good_timestamp_format():
141141
assert isinstance(report, ProcfsReport)
142142

143143

144-
def test_create_procfs_report_from_csv_with_good_timestamp_format_raise_BadInputData():
144+
def test_create_procfs_report_from_csv_with_bad_timestamp_format_raise_BadInputDat():
145145
csv_lines = [
146146
(
147147
"procfs",

0 commit comments

Comments
 (0)