diff options
| author | tassaron | 2022-05-09 22:48:43 -0400 |
|---|---|---|
| committer | tassaron | 2022-05-09 22:48:43 -0400 |
| commit | acef7463a07522784695dbab57c77f1584e12e1b (patch) | |
| tree | 3a367fbc6541831dd1cf76bd5067de070e7793c0 | |
| parent | 07b847e363263221ceb04f8519f45572eda6c5bc (diff) | |
move variable declaration closer to usage.
| -rw-r--r-- | src/command.py | 10 | ||||
| -rw-r--r-- | src/tests/test_commandline_export.py | 2 |
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): | |||
| 261 | test_report = os.path.join(core.Core.logDir, "test_report.log") | 261 | test_report = os.path.join(core.Core.logDir, "test_report.log") |
| 262 | tests.run(test_report) | 262 | tests.run(test_report) |
| 263 | 263 | ||
| 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 | |||
| 270 | # Choose a numbered location to put the output file | 264 | # Choose a numbered location to put the output file |
| 271 | logNumber = 0 | 265 | logNumber = 0 |
| 272 | def getFilename(): | 266 | def getFilename(): |
| @@ -311,6 +305,10 @@ class Command(QtCore.QObject): | |||
| 311 | concatenateLogs("preview_*.log") | 305 | concatenateLogs("preview_*.log") |
| 312 | 306 | ||
| 313 | # Append actual test report to debug log | 307 | # 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) | ||
| 314 | with open(filename, "a") as f: | 312 | with open(filename, "a") as f: |
| 315 | f.write(test_output) | 313 | f.write(test_output) |
| 316 | print(f"Test Report created at {filename}") | 314 | 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): | |||
| 23 | Wait until videoCreated is emitted by the video_thread Worker | 23 | Wait until videoCreated is emitted by the video_thread Worker |
| 24 | or until 10 second timeout has passed | 24 | or until 10 second timeout has passed |
| 25 | ''' | 25 | ''' |
| 26 | sys.__stdout__.write(f"Test Video created at {outputFilename}") | 26 | print(f"Test Video created at {outputFilename}") |
| 27 | 27 | ||
| 28 | assert os.path.exists(outputFilename) | 28 | assert os.path.exists(outputFilename) |
| 29 | # output video should be at least 200kb | 29 | # output video should be at least 200kb |
