@@ -53,7 +53,7 @@ def test_update1():
5353 attach_file .write_bytes (buffer1 )
5454 Thing .update1 (dict (key , picture = attach_file ))
5555 attach_file .unlink ()
56- assert_false ( attach_file .is_file () )
56+ assert not attach_file .is_file ()
5757
5858 # filepath
5959 stage_path = dj .config ["stores" ]["update_repo" ]["stage" ]
@@ -65,7 +65,7 @@ def test_update1():
6565 f .write (original_file_data )
6666 Thing .update1 (dict (key , img_file = managed_file ))
6767 managed_file .unlink ()
68- assert_false ( managed_file .is_file () )
68+ assert not managed_file .is_file ()
6969
7070 check2 = Thing .fetch1 (download_path = scratch_folder )
7171 buffer2 = Path (check2 ["picture" ]).read_bytes () # read attachment
@@ -84,29 +84,23 @@ def test_update1():
8484 )
8585 check3 = Thing .fetch1 ()
8686
87- assert_true (
88- check1 ["number" ] == 0 and check1 ["picture" ] is None and check1 ["params" ] is None
89- )
87+ assert check1 ["number" ] == 0 and check1 ["picture" ] is None and check1 ["params" ] is None
9088
91- assert_true (
92- check2 ["number" ] == 3
89+ assert (check2 ["number" ] == 3
9390 and check2 ["frac" ] == 30.0
9491 and check2 ["picture" ] is not None
9592 and check2 ["params" ] is None
96- and buffer1 == buffer2
97- )
93+ and buffer1 == buffer2 )
9894
99- assert_true (
100- check3 ["number" ] == 0
95+ assert (check3 ["number" ] == 0
10196 and check3 ["frac" ] == 30.0
10297 and check3 ["picture" ] is None
10398 and check3 ["img_file" ] is None
104- and isinstance (check3 ["params" ], np .ndarray )
105- )
99+ and isinstance (check3 ["params" ], np .ndarray ))
106100
107- assert_true ( check3 ["timestamp" ] > check2 ["timestamp" ])
108- assert_equal ( buffer1 , buffer2 )
109- assert_equal ( original_file_data , final_file_data )
101+ assert check3 ["timestamp" ] > check2 ["timestamp" ]
102+ assert buffer1 == buffer2
103+ assert original_file_data == final_file_data
110104
111105
112106@raises (DataJointError )
0 commit comments