@@ -295,37 +295,33 @@ class TestXSlibraryMerging(TempFileMixin):
295
295
-----
296
296
This is just a base class, so it isn't run directly.
297
297
"""
298
-
299
- @classmethod
300
- def setUpClass (cls ):
301
- cls .libAA = None
302
- cls .libAB = None
303
- cls .libCombined = None
304
- cls .libLumped = None
305
-
306
- @classmethod
307
- def tearDownClass (cls ):
308
- cls .libAA = None
309
- cls .libAB = None
310
- cls .libCombined = None
311
- cls .libLumped = None
312
- del cls .libAA
313
- del cls .libAB
314
- del cls .libCombined
315
- del cls .libLumped
316
-
317
298
def setUp (self ):
318
299
TempFileMixin .setUp (self )
319
300
# load a library that is in the ARMI tree. This should
320
301
# be a small library with LFPs, Actinides, structure, and coolant
321
302
for attrName , path in [
322
- (" libAA" , self .getLibAAPath ),
323
- (" libAB" , self .getLibABPath ),
324
- (" libCombined" , self .getLibAA_ABPath ),
325
- (" libLumped" , self .getLibLumpedPath ),
303
+ (f" { self . _testMethodName } libAA" , self .getLibAAPath ),
304
+ (f" { self . _testMethodName } libAB" , self .getLibABPath ),
305
+ (f" { self . _testMethodName } libCombined" , self .getLibAA_ABPath ),
306
+ (f" { self . _testMethodName } libLumped" , self .getLibLumpedPath ),
326
307
]:
327
- if getattr (self .__class__ , attrName ) is None :
328
- setattr (self .__class__ , attrName , self .getReadFunc ()(path ()))
308
+ setattr (self , attrName , self .getReadFunc ()(path ()))
309
+
310
+ @property
311
+ def libAA (self ):
312
+ return getattr (self , f"{ self ._testMethodName } libAA" )
313
+
314
+ @property
315
+ def libAB (self ):
316
+ return getattr (self , f"{ self ._testMethodName } libAB" )
317
+
318
+ @property
319
+ def libCombined (self ):
320
+ return getattr (self , f"{ self ._testMethodName } libCombined" )
321
+
322
+ @property
323
+ def libLumped (self ):
324
+ return getattr (self , f"{ self ._testMethodName } libLumped" )
329
325
330
326
def getErrorType (self ):
331
327
raise NotImplementedError ()
@@ -368,16 +364,13 @@ def test_cannotMergeXSLibxWithDifferentGroupStructure(self):
368
364
def test_mergeEmptyXSLibWithOtherEssentiallyClonesTheOther (self ):
369
365
emptyXSLib = xsLibraries .IsotxsLibrary ()
370
366
emptyXSLib .merge (self .libAA )
371
- self .__class__ .libAA = None
372
367
self .getWriteFunc ()(emptyXSLib , self .testFileName )
373
368
self .assertTrue (filecmp .cmp (self .getLibAAPath (), self .testFileName ))
374
369
375
370
def test_mergeTwoXSLibFiles (self ):
376
371
emptyXSLib = xsLibraries .IsotxsLibrary ()
377
372
emptyXSLib .merge (self .libAA )
378
- self .__class__ .libAA = None
379
373
emptyXSLib .merge (self .libAB )
380
- self .__class__ .libAB = None
381
374
self .assertEqual (
382
375
set (self .libCombined .nuclideLabels ), set (emptyXSLib .nuclideLabels )
383
376
)
@@ -388,9 +381,7 @@ def test_mergeTwoXSLibFiles(self):
388
381
def test_canRemoveIsotopes (self ):
389
382
emptyXSLib = xsLibraries .IsotxsLibrary ()
390
383
emptyXSLib .merge (self .libAA )
391
- self .__class__ .libAA = None
392
384
emptyXSLib .merge (self .libAB )
393
- self .__class__ .libAB = None
394
385
for nucId in [
395
386
"ZR93_7" ,
396
387
"ZR95_7" ,
0 commit comments