66import os
77import unittest
88
9- from sourcefinder .config import Conf , ImgConf
9+ from sourcefinder .config import Conf , ImgConf , ExportSettings
1010
1111from .conftest import DATAPATH
1212from sourcefinder .testutil .decorators import requires_data
@@ -41,7 +41,19 @@ def setUp(self):
4141 beam = (0.2299 ,
4242 0.1597 ,
4343 - 23.87 ))
44- self .image = image .ImageData (fitsfile .data , fitsfile .beam , fitsfile .wcs )
44+ conf = Conf (
45+ image = ImgConf (
46+ # Disallow multiprocessing to enable parallel running of tests using pytest-xdist
47+ allow_multiprocessing = False
48+ ),
49+ export = ExportSettings ()
50+ )
51+ self .image = image .ImageData (
52+ fitsfile .data ,
53+ fitsfile .beam ,
54+ fitsfile .wcs ,
55+ conf = conf ,
56+ )
4557 self .results = self .image .extract (det = 10 , anl = 3.0 )
4658
4759 def tearDown (self ):
@@ -68,7 +80,19 @@ def setUp(self):
6880 beam = (0.2299 ,
6981 0.1597 ,
7082 - 23.87 ))
71- self .image = image .ImageData (fitsfile .data , fitsfile .beam , fitsfile .wcs )
83+ conf = Conf (
84+ image = ImgConf (
85+ # Disallow multiprocessing to enable parallel running of tests using pytest-xdist
86+ allow_multiprocessing = False
87+ ),
88+ export = ExportSettings ()
89+ )
90+ self .image = image .ImageData (
91+ fitsfile .data ,
92+ fitsfile .beam ,
93+ fitsfile .wcs ,
94+ conf = conf ,
95+ )
7296 self .results = self .image .extract (det = 10.0 , anl = 3.0 )
7397
7498 def tearDown (self ):
@@ -114,7 +138,11 @@ def setUp(self):
114138 0.1597 ,
115139 - 23.87 ))
116140 self .image = image .ImageData (
117- fitsfile .data , fitsfile .beam , fitsfile .wcs , Conf (ImgConf (radius = 100 ), {})
141+ fitsfile .data , fitsfile .beam , fitsfile .wcs , Conf (ImgConf (
142+ radius = 100 ,
143+ # Disallow multiprocessing to enable parallel running of tests using pytest-xdist
144+ allow_multiprocessing = False
145+ ), {})
118146 )
119147 self .results = self .image .extract (det = 5 , anl = 3.0 )
120148
@@ -142,8 +170,19 @@ def setUp(self):
142170 beam = (2. * 500.099 / 3600 ,
143171 2. * 319.482 / 3600 ,
144172 168.676 ))
145- self .my_im = image .ImageData (fitsfile .data , fitsfile .beam ,
146- fitsfile .wcs )
173+ conf = Conf (
174+ image = ImgConf (
175+ # Disallow multiprocessing to enable parallel running of tests using pytest-xdist
176+ allow_multiprocessing = False
177+ ),
178+ export = ExportSettings ()
179+ )
180+ self .my_im = image .ImageData (
181+ fitsfile .data ,
182+ fitsfile .beam ,
183+ fitsfile .wcs ,
184+ conf = conf ,
185+ )
147186
148187 def tearDown (self ):
149188 del self .my_im
0 commit comments