Skip to content

Commit e61c843

Browse files
committed
replace uses of pformat_all with pformat
1 parent 2eabdb5 commit e61c843

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

cheta/tests/test_intervals.py

+11-11
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ def test_logical_intervals_one_value_true():
285285
" 2.0 0.0 2.0"
286286
]
287287
# fmt: on
288-
assert out.pformat_all() == exp
288+
assert out.pformat() == exp
289289

290290

291291
def test_logical_intervals_one_value_false():
@@ -299,7 +299,7 @@ def test_logical_intervals_one_value_false():
299299
"-------- ------ -----",
300300
]
301301
# fmt: on
302-
assert out.pformat_all() == exp
302+
assert out.pformat() == exp
303303

304304

305305
def test_logical_intervals_no_start_stop():
@@ -318,7 +318,7 @@ def test_logical_intervals_no_start_stop():
318318
" 2.0 0.5 2.5",
319319
" 1.0 3.5 4.5",
320320
]
321-
assert out.pformat_all() == exp
321+
assert out.pformat() == exp
322322

323323

324324
def test_logical_intervals_start_stop_1():
@@ -340,7 +340,7 @@ def test_logical_intervals_start_stop_1():
340340
" 2.0 0.5 2.5",
341341
" 2.5 3.5 6.0",
342342
]
343-
assert out.pformat_all() == exp
343+
assert out.pformat() == exp
344344

345345

346346
def test_logical_intervals_start_stop_2():
@@ -362,7 +362,7 @@ def test_logical_intervals_start_stop_2():
362362
" 3.5 -1.0 2.5",
363363
" 2.5 3.5 6.0",
364364
]
365-
assert out.pformat_all() == exp
365+
assert out.pformat() == exp
366366

367367

368368
def test_logical_intervals_start_stop_3():
@@ -379,7 +379,7 @@ def test_logical_intervals_start_stop_3():
379379
"-------- ------ -----",
380380
" 1.3 1.2 2.5",
381381
]
382-
assert out.pformat_all() == exp
382+
assert out.pformat() == exp
383383

384384

385385
def test_state_intervals_no_values():
@@ -402,7 +402,7 @@ def test_state_intervals_one_value_true():
402402
"---- -------- ------ -----",
403403
"True 2.0 0.0 2.0",
404404
]
405-
assert out.pformat_all() == exp
405+
assert out.pformat() == exp
406406

407407

408408
def test_state_intervals_no_start_stop():
@@ -423,7 +423,7 @@ def test_state_intervals_no_start_stop():
423423
" 0 1.0 2.5 3.5",
424424
" 1 1.0 3.5 4.5",
425425
]
426-
assert out.pformat_all() == exp
426+
assert out.pformat() == exp
427427

428428

429429
def test_state_intervals_start_stop_1():
@@ -442,7 +442,7 @@ def test_state_intervals_start_stop_1():
442442
" 0 1.0 2.5 3.5",
443443
" 1 2.5 3.5 6.0",
444444
]
445-
assert out.pformat_all() == exp
445+
assert out.pformat() == exp
446446

447447

448448
def test_state_intervals_start_stop_2():
@@ -461,7 +461,7 @@ def test_state_intervals_start_stop_2():
461461
" 0 1.0 2.5 3.5",
462462
" 1 2.5 3.5 6.0",
463463
]
464-
assert out.pformat_all() == exp
464+
assert out.pformat() == exp
465465

466466

467467
def test_state_intervals_start_stop_3():
@@ -481,4 +481,4 @@ def test_state_intervals_start_stop_3():
481481
" 40 1.0 2.5 3.5",
482482
" 50 0.4 3.5 3.9",
483483
]
484-
assert out.pformat_all() == exp
484+
assert out.pformat() == exp

cheta/tests/test_utils.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ def test_get_ofp_states():
9696
"2022:295:17:41:01.477 2022:297:00:00:00.000 NRML",
9797
]
9898

99-
assert out["datestart", "datestop", "val"].pformat_all() == exp
99+
assert out["datestart", "datestop", "val"].pformat() == exp
100100

101101

102102
@pytest.mark.parametrize("dt", [0.001, 1.0])
@@ -113,7 +113,7 @@ def test_get_ofp_states_safe_mode_short(dt):
113113
f"2022:295:00:00:00.000 2022:295:00:00:{secs} SAFE",
114114
]
115115

116-
assert out["datestart", "datestop", "val"].pformat_all() == exp
116+
assert out["datestart", "datestop", "val"].pformat() == exp
117117

118118

119119
@pytest.mark.parametrize("dt", [0.001, 1.0])
@@ -137,7 +137,7 @@ def test_get_telem_table(dt):
137137
],
138138
}
139139

140-
assert dat.pformat_all() == exp[dt]
140+
assert dat.pformat() == exp[dt]
141141

142142

143143
@pytest.mark.parametrize("unit_system", ["eng", "cxc", "sci", None])

0 commit comments

Comments
 (0)