Skip to content

Commit 5a0b552

Browse files
authored
Merge pull request #220 from Overlord360/skip-test-fix
Fix issue where a non-boolean variable passed into a testclass would skip the test
2 parents 07ea377 + 3006bd4 commit 5a0b552

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

src/fixate/core/common.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -423,7 +423,12 @@ class TestClass:
423423
skip_on_fail = False
424424

425425
def __init__(self, skip=False):
426-
self.skip = skip
426+
# Explicitly check if skip is True (and only true) to avoid the case where skip is set to a non-boolean value
427+
if skip is True:
428+
self.skip = True
429+
else:
430+
self.skip = False
431+
427432
if not self.test_desc:
428433
try:
429434
doc_string = [

0 commit comments

Comments
 (0)