We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
test_base
1 parent 792dcbd commit 2e0de6bCopy full SHA for 2e0de6b
test/test_base.py
@@ -3,6 +3,7 @@
3
import logging.config
4
import os
5
import re
6
+import shlex
7
import threading
8
from pathlib import Path
9
from subprocess import run
@@ -66,7 +67,7 @@ def assert_log_msgs(self):
66
67
68
def warnet(self, cmd):
69
self.log.debug(f"Executing warnet command: {cmd}")
- command = ["warnet"] + cmd.split()
70
+ command = ["warnet"] + shlex.split(cmd) # shlex handles escape sequences nicely
71
proc = run(command, capture_output=True)
72
if proc.stderr:
73
raise Exception(proc.stderr.decode().strip())
0 commit comments