Skip to content

Commit 0bf0f88

Browse files
committed
Added -vv flags to mbed commands run in pytest to produce more useful failure messages
1 parent 261c3cb commit 0bf0f88

File tree

2 files changed

+18
-18
lines changed

2 files changed

+18
-18
lines changed

test/add_test.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ def test_add(mbed, testrepos):
1717
test3 = testrepos[2]
1818

1919
with cd('test1'):
20-
popen(['python', mbed, 'add', test3])
20+
popen(['python', mbed, 'add', test3, "-vv"])
2121

2222
assertls(mbed, 'test1', [
2323
"test1",
@@ -34,7 +34,7 @@ def test_import_after_add(mbed, testrepos):
3434
mkcommit('test1')
3535

3636
test1 = testrepos[0]
37-
popen(['python', mbed, 'import', test1, 'testimport'])
37+
popen(['python', mbed, 'import', test1, 'testimport', "-vv"])
3838

3939
assertls(mbed, 'testimport', [
4040
"testimport",

test/sync_update_test.py

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -15,40 +15,40 @@
1515
# Tests if a 'mbed sync', commit, and 'mbed update' works on a simple file change
1616
def test_sync_update(mbed, testrepos):
1717
test1 = testrepos[0]
18-
popen(['python', mbed, 'import', test1, 'testimport'])
18+
popen(['python', mbed, 'import', test1, 'testimport', '-vv'])
1919

2020
with cd('test1/test2'):
2121
with open('hello', 'w') as f:
2222
f.write('hello\n')
2323
popen([scm(), 'add', 'hello'])
24-
popen(['python', mbed, 'sync'])
24+
popen(['python', mbed, 'sync', '-vv'])
2525
mkcommit()
2626

2727
with cd('test1'):
28-
popen(['python', mbed, 'sync'])
28+
popen(['python', mbed, 'sync', '-vv'])
2929
mkcommit()
3030

3131
with cd('testimport'):
32-
popen(['python', mbed, 'update'])
32+
popen(['python', mbed, 'update', '-vv'])
3333

3434
assert os.path.isfile('testimport/test2/hello')
3535

3636
# Tests if removing a library is carried over sync/update
3737
def test_sync_update_remove(mbed, testrepos):
3838
test1 = testrepos[0]
39-
popen(['python', mbed, 'import', test1, 'testimport'])
39+
popen(['python', mbed, 'import', test1, 'testimport', '-vv'])
4040

4141
with cd('test1/test2'):
4242
remove('test3')
43-
popen(['python', mbed, 'sync'])
43+
popen(['python', mbed, 'sync', '-vv'])
4444
mkcommit()
4545

4646
with cd('test1'):
47-
popen(['python', mbed, 'sync'])
47+
popen(['python', mbed, 'sync', '-vv'])
4848
mkcommit()
4949

5050
with cd('testimport'):
51-
popen(['python', mbed, 'update'])
51+
popen(['python', mbed, 'update', '-vv'])
5252

5353
assertls(mbed, 'testimport', [
5454
"testimport",
@@ -58,19 +58,19 @@ def test_sync_update_remove(mbed, testrepos):
5858
# Tests if adding a library is carried over sync/update
5959
def test_sync_update_add(mbed, testrepos):
6060
test1 = testrepos[0]
61-
popen(['python', mbed, 'import', test1, 'testimport'])
61+
popen(['python', mbed, 'import', test1, 'testimport', '-vv'])
6262

6363
with cd('test1/test2'):
6464
copy('test3', 'testcopy')
65-
popen(['python', mbed, 'sync'])
65+
popen(['python', mbed, 'sync', '-vv'])
6666
mkcommit()
6767

6868
with cd('test1'):
69-
popen(['python', mbed, 'sync'])
69+
popen(['python', mbed, 'sync', '-vv'])
7070
mkcommit()
7171

7272
with cd('testimport'):
73-
popen(['python', mbed, 'update'])
73+
popen(['python', mbed, 'update', '-vv'])
7474

7575
assertls(mbed, 'testimport', [
7676
"testimport",
@@ -84,19 +84,19 @@ def test_sync_update_add(mbed, testrepos):
8484
# Tests if moving a library is carried over sync/update
8585
def test_sync_update_move(mbed, testrepos):
8686
test1 = testrepos[0]
87-
popen(['python', mbed, 'import', test1, 'testimport'])
87+
popen(['python', mbed, 'import', test1, 'testimport', '-vv'])
8888

8989
with cd('test1/test2'):
9090
move('test3', 'testmove')
91-
popen(['python', mbed, 'sync'])
91+
popen(['python', mbed, 'sync', '-vv'])
9292
mkcommit()
9393

9494
with cd('test1'):
95-
popen(['python', mbed, 'sync'])
95+
popen(['python', mbed, 'sync', '-vv'])
9696
mkcommit()
9797

9898
with cd('testimport'):
99-
popen(['python', mbed, 'update'])
99+
popen(['python', mbed, 'update', '-vv'])
100100

101101
assertls(mbed, 'testimport', [
102102
"testimport",

0 commit comments

Comments
 (0)