aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/test_klippy.py
diff options
context:
space:
mode:
Diffstat (limited to 'scripts/test_klippy.py')
-rw-r--r--scripts/test_klippy.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/scripts/test_klippy.py b/scripts/test_klippy.py
index f70095b5..8aebd9b2 100644
--- a/scripts/test_klippy.py
+++ b/scripts/test_klippy.py
@@ -57,7 +57,7 @@ class TestCase:
elif parts[0] == "SHOULD_FAIL":
should_fail = True
else:
- gcode.append(line)
+ gcode.append(line.strip())
f.close()
if not multi_tests:
self.launch_test(config_fname, dict_fname,
@@ -69,7 +69,7 @@ class TestCase:
gcode_fname = self.relpath("_test_.gcode", 'temp')
gcode_is_temp = True
f = open(gcode_fname, 'wb')
- f.write('\n'.join(gcode))
+ f.write('\n'.join(gcode + ['']))
f.close()
elif gcode:
raise error("Can't specify both a gcode file and gcode commands")
@@ -81,13 +81,13 @@ class TestCase:
sys.stderr.write("\n Starting %s (%s)\n" % (
self.fname, os.path.basename(config_fname)))
args = [sys.executable, './klippy/klippy.py', config_fname,
- '-i', gcode_fname, '-o', '/dev/null',
+ '-i', gcode_fname, '-o', '/dev/null', '-v',
'-d', dict_fname
]
res = subprocess.call(args)
if should_fail:
if not res:
- raise error("Test failed to raise and error")
+ raise error("Test failed to raise an error")
else:
if res:
raise error("Error during test")