Skip to content

Commit

Permalink
move variable declaration closer to usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
tassaron committed May 10, 2022
1 parent 07b847e commit acef746
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions src/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,12 +261,6 @@ def runTests(self):
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():
Expand Down Expand Up @@ -311,6 +305,10 @@ def concatenateLogs(logPattern):
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}")
2 changes: 1 addition & 1 deletion src/tests/test_commandline_export.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit acef746

Please sign in to comment.