Skip to content

Commit 9f46049

Browse files
authored
Merge pull request #1166 from mulkieran/conditionalize-strict-test
testing: Only check for ValueError when strict
2 parents d7bea12 + 8a99848 commit 9f46049

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

tests/whitebox/unittest/test_constants.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
"""
1717

1818
# isort: STDLIB
19+
import os
1920
import unittest
2021

2122
# isort: LOCAL
@@ -97,8 +98,9 @@ def test_str_method(self):
9798
for feature in PoolFeature:
9899
if feature is PoolFeature.UNRECOGNIZED:
99100
self.assertIsInstance(str(feature), str)
100-
with self.assertRaises(ValueError):
101-
PoolFeature("unknown")
101+
if bool(int(os.environ.get("STRATIS_STRICT_POOL_FEATURES", False))):
102+
with self.assertRaises(ValueError):
103+
PoolFeature("unknown")
102104
else:
103105
self.assertEqual(str(feature), feature.value)
104106
self.assertEqual(PoolFeature(feature.value), feature)

0 commit comments

Comments
 (0)