Skip to content

Commit 7a86564

Browse files
[PATCH] Related work (- WIP #151 -)
Changes in file tests/context.py: - Oops I missed strings import check. The Linter did not. 🙊 Changes in file tests/test_fuzz.py: - style fixes for the Linter.
1 parent 542fc4a commit 7a86564

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/context.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,8 +86,10 @@
8686
import os
8787
if not hasattr(os, 'sep') or not os.sep: # pragma: no branch
8888
raise ModuleNotFoundError("[CWE-440] OS support is not available.") from None
89-
import secrets
9089
import string
90+
if not hasattr(string, 'digits') or not string.digits: # pragma: no branch
91+
raise ModuleNotFoundError("[CWE-440] string support is not available.") from None
92+
import secrets
9193
import unittest
9294
except ImportError as err: # pragma: no branch
9395
raise ModuleNotFoundError("[CWE-440] Module Failed to import.") from err

tests/test_fuzz.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,8 +72,7 @@
7272
from hypothesis import settings
7373
from hypothesis import strategies as st
7474
_has_hypothesis = True
75-
except ImportError as _cause: # pragma: no branch
76-
del _cause # skipcq - cleanup any error vars early
75+
except ImportError: # pragma: no branch
7776
_has_hypothesis = False
7877

7978

0 commit comments

Comments
 (0)