File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
mantidimaging/core/parallel/test Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -42,17 +42,19 @@ def test_execute_impl_par(mock_pool):
42
42
43
43
44
44
def test_free_all_owned_by_this_instance ():
45
- [sa .delete (x .name .decode ("utf-8" )) for x in sa .list ()]
46
45
create_array ((10 , 10 ), np .float32 , random_name = True )
47
46
create_array ((10 , 10 ), np .float32 , random_name = True )
48
47
create_array ((10 , 10 ), np .float32 , random_name = True )
49
48
50
49
temp_name = "not_this_instance"
51
50
sa .create ("not_this_instance" , (10 , 10 ))
52
51
53
- assert len (sa .list ()) == 4
52
+ # these tests run in parallel, this should avoid some race conditions at least
53
+ initial = len (sa .list ())
54
+ # frees the 3 allocated above
54
55
free_all_owned_by_this_instance ()
55
- assert len (sa .list ()) == 1
56
+ expected = initial - 3
57
+ assert len (sa .list ()) == expected
56
58
sa .delete (temp_name )
57
59
58
60
You can’t perform that action at this time.
0 commit comments