aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authortassaron2022-05-09 22:48:43 -0400
committertassaron2022-05-09 22:48:43 -0400
commitacef7463a07522784695dbab57c77f1584e12e1b (patch)
tree3a367fbc6541831dd1cf76bd5067de070e7793c0 /src
parent07b847e363263221ceb04f8519f45572eda6c5bc (diff)
move variable declaration closer to usage.
Diffstat (limited to 'src')
-rw-r--r--src/command.py10
-rw-r--r--src/tests/test_commandline_export.py2
2 files changed, 5 insertions, 7 deletions
diff --git a/src/command.py b/src/command.py
index 4850051..53801fa 100644
--- a/src/command.py
+++ b/src/command.py
@@ -261,12 +261,6 @@ class Command(QtCore.QObject):
test_report = os.path.join(core.Core.logDir, "test_report.log")
tests.run(test_report)
- # Print test report into terminal
- with open(test_report, "r") as f:
- output = f.readlines()
- test_output = "".join(output)
- print(test_output)
-
# Choose a numbered location to put the output file
logNumber = 0
def getFilename():
@@ -311,6 +305,10 @@ class Command(QtCore.QObject):
concatenateLogs("preview_*.log")
# Append actual test report to debug log
+ with open(test_report, "r") as f:
+ output = f.readlines()
+ test_output = "".join(output)
+ print(test_output)
with open(filename, "a") as f:
f.write(test_output)
print(f"Test Report created at {filename}")
diff --git a/src/tests/test_commandline_export.py b/src/tests/test_commandline_export.py
index 62db3b6..7f3530f 100644
--- a/src/tests/test_commandline_export.py
+++ b/src/tests/test_commandline_export.py
@@ -23,7 +23,7 @@ def test_commandline_classic_export(qtbot):
Wait until videoCreated is emitted by the video_thread Worker
or until 10 second timeout has passed
'''
- sys.__stdout__.write(f"Test Video created at {outputFilename}")
+ print(f"Test Video created at {outputFilename}")
assert os.path.exists(outputFilename)
# output video should be at least 200kb