Skip to content

Commit acef746

Browse files
committed
move variable declaration closer to usage.
1 parent 07b847e commit acef746

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

src/command.py

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -261,12 +261,6 @@ def runTests(self):
261261
test_report = os.path.join(core.Core.logDir, "test_report.log")
262262
tests.run(test_report)
263263

264-
# Print test report into terminal
265-
with open(test_report, "r") as f:
266-
output = f.readlines()
267-
test_output = "".join(output)
268-
print(test_output)
269-
270264
# Choose a numbered location to put the output file
271265
logNumber = 0
272266
def getFilename():
@@ -311,6 +305,10 @@ def concatenateLogs(logPattern):
311305
concatenateLogs("preview_*.log")
312306

313307
# Append actual test report to debug log
308+
with open(test_report, "r") as f:
309+
output = f.readlines()
310+
test_output = "".join(output)
311+
print(test_output)
314312
with open(filename, "a") as f:
315313
f.write(test_output)
316314
print(f"Test Report created at {filename}")

src/tests/test_commandline_export.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def test_commandline_classic_export(qtbot):
2323
Wait until videoCreated is emitted by the video_thread Worker
2424
or until 10 second timeout has passed
2525
'''
26-
sys.__stdout__.write(f"Test Video created at {outputFilename}")
26+
print(f"Test Video created at {outputFilename}")
2727

2828
assert os.path.exists(outputFilename)
2929
# output video should be at least 200kb

0 commit comments

Comments
 (0)