Skip to content

Commit

Permalink
Undo formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
etienneschalk committed Feb 27, 2024
1 parent f49b91b commit 778f325
Showing 1 changed file with 5 additions and 21 deletions.
26 changes: 5 additions & 21 deletions tests/functional/test_functional.py
Original file line number Diff line number Diff line change
Expand Up @@ -655,9 +655,7 @@ def test_httpoxy(self):
def test_asserts(self):
"""Test catching the use of assert."""
test = next(
x
for x in self.b_mgr.b_ts.tests["Assert"]
if x.__name__ == "assert_used"
x for x in self.b_mgr.b_ts.tests["Assert"] if x.__name__ == "assert_used"
)

test._config = {"skips": []}
Expand Down Expand Up @@ -768,15 +766,11 @@ def test_multiline_code(self):
self.run_example("multiline_statement.py")
self.assertEqual(0, len(self.b_mgr.skipped))
self.assertEqual(1, len(self.b_mgr.files_list))
self.assertTrue(
self.b_mgr.files_list[0].endswith("multiline_statement.py")
)
self.assertTrue(self.b_mgr.files_list[0].endswith("multiline_statement.py"))

issues = self.b_mgr.get_issue_list()
self.assertEqual(3, len(issues))
self.assertTrue(
issues[0].fname.endswith("examples/multiline_statement.py")
)
self.assertTrue(issues[0].fname.endswith("examples/multiline_statement.py"))
self.assertEqual(1, issues[0].lineno)
self.assertEqual(list(range(1, 2)), issues[0].linerange)
self.assertIn("subprocess", issues[0].get_code())
Expand Down Expand Up @@ -926,17 +920,7 @@ def test_snmp_security_check(self):
def test_tarfile_unsafe_members(self):
"""Test insecure usage of tarfile."""
expect = {
"SEVERITY": {
"UNDEFINED": 0,
"LOW": 1,
"MEDIUM": 2,
"HIGH": 2,
},
"CONFIDENCE": {
"UNDEFINED": 0,
"LOW": 1,
"MEDIUM": 2,
"HIGH": 2,
},
"SEVERITY": {"UNDEFINED": 0, "LOW": 1, "MEDIUM": 2, "HIGH": 2},
"CONFIDENCE": {"UNDEFINED": 0, "LOW": 1, "MEDIUM": 2, "HIGH": 2},
}
self.check_example("tarfile_extractall.py", expect)

0 comments on commit 778f325

Please sign in to comment.