@@ -86,39 +86,10 @@ def add_simple_table(nwbfile: NWBFile):
8686class TestInspector (TestCase ):
8787 maxDiff = None
8888
89- # @classmethod
90- # def setUpClass(cls):
91- # cls.tempdir = Path(mkdtemp())
92- # cls.checks = [
93- # check_small_dataset_compression,
94- # check_regular_timestamps,
95- # check_data_orientation,
96- # check_timestamps_match_first_dimension,
97- # ]
98- # num_nwbfiles = 3
99- # nwbfiles = list()
100- # for j in range(num_nwbfiles):
101- # nwbfiles.append(make_minimal_nwbfile())
102- # add_big_dataset_no_compression(nwbfiles[0])
103- # add_regular_timestamps(nwbfiles[0])
104- # add_flipped_data_orientation_to_processing(nwbfiles[0])
105- # add_non_matching_timestamps_dimension(nwbfiles[0])
106- # add_simple_table(nwbfiles[0])
107- # add_regular_timestamps(nwbfiles[1])
108- # # Last file to be left without violations
109-
110- # cls.nwbfile_paths = [str(cls.tempdir / f"testing{j}.nwb") for j in range(num_nwbfiles)]
111- # for nwbfile_path, nwbfile in zip(cls.nwbfile_paths, nwbfiles):
112- # with NWBHDF5IO(path=nwbfile_path, mode="w") as io:
113- # io.write(nwbfile)
114-
115- # @classmethod
116- # def tearDownClass(cls):
117- # rmtree(cls.tempdir)
118-
119- def setUp (self ):
120- self .tempdir = Path (mkdtemp ())
121- self .checks = [
89+ @classmethod
90+ def setUpClass (cls ):
91+ cls .tempdir = Path (mkdtemp ())
92+ cls .checks = [
12293 check_small_dataset_compression ,
12394 check_regular_timestamps ,
12495 check_data_orientation ,
@@ -136,13 +107,14 @@ def setUp(self):
136107 add_regular_timestamps (nwbfiles [1 ])
137108 # Last file to be left without violations
138109
139- self .nwbfile_paths = [str (self .tempdir / f"testing{ j } .nwb" ) for j in range (num_nwbfiles )]
140- for nwbfile_path , nwbfile in zip (self .nwbfile_paths , nwbfiles ):
110+ cls .nwbfile_paths = [str (cls .tempdir / f"testing{ j } .nwb" ) for j in range (num_nwbfiles )]
111+ for nwbfile_path , nwbfile in zip (cls .nwbfile_paths , nwbfiles ):
141112 with NWBHDF5IO (path = nwbfile_path , mode = "w" ) as io :
142113 io .write (nwbfile )
143114
144- def tearDown (self ):
145- rmtree (self .tempdir )
115+ @classmethod
116+ def tearDownClass (cls ):
117+ rmtree (cls .tempdir )
146118
147119 def assertFileExists (self , path : FilePathType ):
148120 path = Path (path )
0 commit comments