File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed
Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -199,7 +199,7 @@ def main(args):
199199 # for x in loyb[loyb['datetime']>59900].iloc:
200200 # ...: print(x['cirt'])
201201 for s in do_setup .iloc :
202- if s ["valid" ] is False :
202+ if s ["valid" ] == False : # noqa: E712 # the valid column store np.bool_ for whatever reason
203203 continue
204204
205205 this_start = max (start , s ["datetime" ])
@@ -346,7 +346,7 @@ def main(args):
346346
347347 # LOOP 4b: tracked changes
348348 for s in do_out_setup .iloc :
349- if s ["valid" ] is False :
349+ if s ["valid" ] == False : # noqa: E712 # the valid column store np.bool_ for whatever reason
350350 continue
351351
352352 this_start = max (start , s ["datetime" ])
Original file line number Diff line number Diff line change 1+ #datetime comb physical nominal kscale foffset N fbeat_sign f0_scale counter1 flo1 min1 max1 counter2 flo2 min2 max2 threshold
2+ 2022-03-21T00:00:00 disconnected
3+ 2022-03-21T00:30:00 comb2 cavity4 '518_295_836_590_863.63' 2 67_059_566. 1_036_592 -1 1 11 -154.3e6 58.5e6 59.5e6 12 35.7e6 58.7e6 59.7e6 0.2
Original file line number Diff line number Diff line change @@ -81,3 +81,20 @@ def test_main_auto():
8181 rocit_data = rl .load_link_from_dir ("./tests/Outputs/2022-03/INRIM_HM-INRIM_LoYb" )
8282 assert len (rocit_data .t ) == 3600
8383 assert rocit_data .oscA .name == "INRIM_LoYb"
84+
85+
86+ def test_main_with_invalid ():
87+ # delete previous results
88+ try :
89+ shutil .rmtree ("./tests/Outputs/" )
90+ except FileNotFoundError :
91+ pass
92+ args = parse_args (
93+ "--do LoYb_with_invalid --start 59658 --stop 59660 --dir ./tests/Outputs --fig-dir ./tests/Outputs/Figures --comb-dir ./tests/samples --setup-dir ./tests/samples --track-cirt" .split (
94+ " "
95+ )
96+ )
97+ main (args )
98+ rocit_data = rl .load_link_from_dir ("./tests/Outputs/INRIM_HM-INRIM_LoYb_with_invalid" )
99+ assert len (rocit_data .t ) == 1801
100+ assert rocit_data .oscA .name == "INRIM_LoYb_with_invalid"
You can’t perform that action at this time.
0 commit comments