@@ -811,7 +811,7 @@ def test_lazy_tractogram_creation(self):
811
811
812
812
# Empty `LazyTractogram`
813
813
tractogram = LazyTractogram ()
814
- with pytest .warns (Warning ):
814
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
815
815
check_tractogram (tractogram )
816
816
assert tractogram .affine_to_rasmm is None
817
817
@@ -833,7 +833,7 @@ def test_lazy_tractogram_creation(self):
833
833
def test_lazy_tractogram_from_data_func (self ):
834
834
# Create an empty `LazyTractogram` yielding nothing.
835
835
tractogram = LazyTractogram .from_data_func (lambda : iter ([]))
836
- with pytest .warns (Warning ):
836
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
837
837
check_tractogram (tractogram )
838
838
839
839
# Create `LazyTractogram` from a generator function yielding
@@ -854,7 +854,7 @@ def _data_gen():
854
854
data_for_points )
855
855
856
856
tractogram = LazyTractogram .from_data_func (_data_gen )
857
- with pytest .warns (Warning ):
857
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
858
858
assert_tractogram_equal (tractogram , DATA ['tractogram' ])
859
859
860
860
# Creating a LazyTractogram from not a corouting should raise an error.
@@ -924,7 +924,7 @@ def test_lazy_tractogram_apply_affine(self):
924
924
assert_array_equal (transformed_tractogram ._affine_to_apply , affine )
925
925
assert_array_equal (transformed_tractogram .affine_to_rasmm ,
926
926
np .dot (np .eye (4 ), np .linalg .inv (affine )))
927
- with pytest .warns (Warning ):
927
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
928
928
check_tractogram (transformed_tractogram ,
929
929
streamlines = [s * scaling for s in DATA ['streamlines' ]],
930
930
data_per_streamline = DATA ['data_per_streamline' ],
@@ -950,7 +950,7 @@ def test_lazy_tractogram_apply_affine(self):
950
950
transformed_tractogram = tractogram .apply_affine (affine )
951
951
assert_array_equal (transformed_tractogram ._affine_to_apply , affine )
952
952
assert transformed_tractogram .affine_to_rasmm is None
953
- with pytest .warns (Warning ):
953
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
954
954
check_tractogram (transformed_tractogram ,
955
955
streamlines = [s * scaling for s in DATA ['streamlines' ]],
956
956
data_per_streamline = DATA ['data_per_streamline' ],
@@ -1024,5 +1024,5 @@ def test_lazy_tractogram_copy(self):
1024
1024
DATA ['lazy_tractogram' ]._affine_to_apply )
1025
1025
1026
1026
# Check the data are the equivalent.
1027
- with pytest .warns (Warning ):
1027
+ with pytest .warns (Warning , match = "Number of streamlines will be determined manually" ):
1028
1028
assert_tractogram_equal (tractogram , DATA ['tractogram' ])
0 commit comments