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):
4242
4343
4444def test_free_all_owned_by_this_instance ():
45- [sa .delete (x .name .decode ("utf-8" )) for x in sa .list ()]
4645 create_array ((10 , 10 ), np .float32 , random_name = True )
4746 create_array ((10 , 10 ), np .float32 , random_name = True )
4847 create_array ((10 , 10 ), np .float32 , random_name = True )
4948
5049 temp_name = "not_this_instance"
5150 sa .create ("not_this_instance" , (10 , 10 ))
5251
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
5455 free_all_owned_by_this_instance ()
55- assert len (sa .list ()) == 1
56+ expected = initial - 3
57+ assert len (sa .list ()) == expected
5658 sa .delete (temp_name )
5759
5860
You can’t perform that action at this time.
0 commit comments