@@ -385,16 +385,16 @@ def test_capacity_factor(self):
385
385
self .assertListAlmostEqual (etg_20_expected , etg_20 , percent = 1 )
386
386
387
387
def test_unsupported_econ_params_ignored_with_warning (self ):
388
- with self .assertLogs (level = 'INFO' ) as logs :
389
- gtr_provided_result = self ._get_result ({'Gross Revenue Tax Rate' : 0.5 })
390
-
391
388
is_github_actions = 'CI' in os .environ or 'TOXPYTHON' in os .environ
392
389
try :
393
- self .assertHasLogRecordWithMessage (
394
- logs ,
395
- 'Gross Revenue Tax Rate provided value (0.5) will be ignored. '
396
- '(SAM Economics tax rates are determined from Combined Income Tax Rate and Property Tax Rate.)' ,
397
- )
390
+ with self .assertLogs (level = 'INFO' ) as logs :
391
+ gtr_provided_result = self ._get_result ({'Gross Revenue Tax Rate' : 0.5 })
392
+
393
+ self .assertHasLogRecordWithMessage (
394
+ logs ,
395
+ 'Gross Revenue Tax Rate provided value (0.5) will be ignored. '
396
+ '(SAM Economics tax rates are determined from Combined Income Tax Rate and Property Tax Rate.)' ,
397
+ )
398
398
except AssertionError as ae :
399
399
if is_github_actions :
400
400
# TODO to investigate and fix
@@ -409,21 +409,21 @@ def _npv(r: GeophiresXResult) -> float:
409
409
410
410
self .assertEqual (_npv (default_result ), _npv (gtr_provided_result )) # Check GTR is ignored in calculations
411
411
412
- with self .assertLogs (level = 'INFO' ) as logs :
413
- eir_provided_result = self ._get_result ({'Inflated Equity Interest Rate' : 0.25 })
412
+ try :
413
+ with self .assertLogs (level = 'INFO' ) as logs :
414
+ eir_provided_result = self ._get_result ({'Inflated Equity Interest Rate' : 0.25 })
414
415
415
- try :
416
416
self .assertHasLogRecordWithMessage (
417
417
logs ,
418
418
'Inflated Equity Interest Rate provided value (0.25) will be ignored. '
419
419
'(SAM Economics does not support Inflated Equity Interest Rate.)' ,
420
420
)
421
- except AssertionError as ae :
422
- if is_github_actions :
423
- # TODO to investigate and fix
424
- self .skipTest ('Skipping due to intermittent failure on GitHub Actions' )
425
- else :
426
- raise ae
421
+ except AssertionError as ae :
422
+ if is_github_actions :
423
+ # TODO to investigate and fix
424
+ self .skipTest ('Skipping due to intermittent failure on GitHub Actions' )
425
+ else :
426
+ raise ae
427
427
428
428
self .assertEqual (_npv (default_result ), _npv (eir_provided_result )) # Check EIR is ignored in calculations
429
429
0 commit comments