Commit 1098bf66 authored by Paul McCarthy's avatar Paul McCarthy 🚵
Browse files

TEST: make monitor progress test slightly more robust

parent bd3de69d
...@@ -147,6 +147,7 @@ def test_Process_monitor_progress(): ...@@ -147,6 +147,7 @@ def test_Process_monitor_progress():
for ((i=0;i<10;i++)); do for ((i=0;i<10;i++)); do
echo $i echo $i
done done
touch $1
""").strip() """).strip()
with open('script', 'wt') as f: with open('script', 'wt') as f:
...@@ -154,14 +155,22 @@ def test_Process_monitor_progress(): ...@@ -154,14 +155,22 @@ def test_Process_monitor_progress():
os.chmod('script', 0o755) os.chmod('script', 0o755)
script = op.join(cwd, 'script') script = op.join(cwd, 'script')
inst.Process.monitor_progress( script) # py2: make sure function accepts string and unicode
inst.Process.monitor_progress([script]) scripts = [script, u'{}'.format(script)]
inst.Process.monitor_progress([script, script])
inst.Process.monitor_progress( script, 10) for script in scripts:
inst.Process.monitor_progress([script], 10) inst.Process.monitor_progress( script + ' a')
inst.Process.monitor_progress([script, script], 10) inst.Process.monitor_progress([script + ' b'])
inst.Process.monitor_progress([script + ' c', script + ' d'])
inst.Process.monitor_progress( script + ' e', 10)
inst.Process.monitor_progress([script + ' f'], 10)
inst.Process.monitor_progress([script + ' g', script + ' h'], 10)
for touched in 'abcdefgh':
assert op.exists(touched)
os.remove(touched)
def test_read_fslversion(): def test_read_fslversion():
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment