@@ -53,7 +53,7 @@ def test_update1():
53
53
attach_file .write_bytes (buffer1 )
54
54
Thing .update1 (dict (key , picture = attach_file ))
55
55
attach_file .unlink ()
56
- assert_false ( attach_file .is_file () )
56
+ assert not attach_file .is_file ()
57
57
58
58
# filepath
59
59
stage_path = dj .config ["stores" ]["update_repo" ]["stage" ]
@@ -65,7 +65,7 @@ def test_update1():
65
65
f .write (original_file_data )
66
66
Thing .update1 (dict (key , img_file = managed_file ))
67
67
managed_file .unlink ()
68
- assert_false ( managed_file .is_file () )
68
+ assert not managed_file .is_file ()
69
69
70
70
check2 = Thing .fetch1 (download_path = scratch_folder )
71
71
buffer2 = Path (check2 ["picture" ]).read_bytes () # read attachment
@@ -84,29 +84,23 @@ def test_update1():
84
84
)
85
85
check3 = Thing .fetch1 ()
86
86
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
90
88
91
- assert_true (
92
- check2 ["number" ] == 3
89
+ assert (check2 ["number" ] == 3
93
90
and check2 ["frac" ] == 30.0
94
91
and check2 ["picture" ] is not None
95
92
and check2 ["params" ] is None
96
- and buffer1 == buffer2
97
- )
93
+ and buffer1 == buffer2 )
98
94
99
- assert_true (
100
- check3 ["number" ] == 0
95
+ assert (check3 ["number" ] == 0
101
96
and check3 ["frac" ] == 30.0
102
97
and check3 ["picture" ] is None
103
98
and check3 ["img_file" ] is None
104
- and isinstance (check3 ["params" ], np .ndarray )
105
- )
99
+ and isinstance (check3 ["params" ], np .ndarray ))
106
100
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
110
104
111
105
112
106
@raises (DataJointError )
0 commit comments