Move unit tests to their own sub-dir in tests
This commit is contained in:
parent
62b414af3c
commit
d08d4cd325
35 changed files with 6 additions and 7 deletions
22
tests/unit_tests/mock_stitching/mock-stitch.py
Normal file
22
tests/unit_tests/mock_stitching/mock-stitch.py
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
"""CLI script used for testing subprocess calls that should go to openflexure-stitch."""
|
||||
|
||||
import sys
|
||||
import time
|
||||
|
||||
|
||||
def main():
|
||||
"""Echo command-line arguments with a short delay between each."""
|
||||
input_arguments = sys.argv[1:]
|
||||
for arg in input_arguments:
|
||||
# This is used to check we catch errors correctly.
|
||||
if arg == "ERROR":
|
||||
raise RuntimeError("I was told to do this.")
|
||||
if arg == "HANG":
|
||||
# Rather than hang, just sleep for 10s:
|
||||
time.sleep(10)
|
||||
print(arg, flush=True)
|
||||
time.sleep(0.2)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue