Skip to content

Commit

Permalink
[REGRESSION] Fixes for regressions and some cli argument wrangling ( c…
Browse files Browse the repository at this point in the history
…loses #28 + re-closes #34 )
  • Loading branch information
reactive-firewall committed Mar 3, 2022
1 parent a0e4453 commit 241922e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions tests/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -245,17 +245,18 @@ def checkCovCommand(args=[None]):
if sys.__name__ is None: # pragma: no branch
raise ImportError("[CWE-758] Failed to import system. WTF?!!")
if str("coverage") in args[0]:
i = 0
i = 1
if str("{} -m coverage").format(str(sys.executable)) in str(args[0]): # pragma: no branch
args[0] = str(sys.executable)
args.insert(1, str("-m"))
args.insert(2, str("coverage"))
i = 2
i += 2
else: # pragma: no branch
args[0] = str(getCoverageCommand())
args.insert(i + 1, str("run"))
args.insert(i + 2, str("-p"))
args.insert(i + 3, str("--source=multicast"))
extra_args = ["""run""", """-p""", """--source=multicast"""]
for k in range(0, len(extra_args)):
offset = i + k
args.insert(offset, extra_args[k])
return args


Expand Down

0 comments on commit 241922e

Please sign in to comment.