Skip to content

Commit b921e42

Browse files
committed
Improve test cases to be a bit more robust
1 parent 56d159f commit b921e42

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎src/tests/test_method.py‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -899,9 +899,6 @@ def test_object_in_multiparam_exception():
899899
c = e.__cause__
900900
assert c.GetType().FullName == 'System.AggregateException'
901901
assert len(c.InnerExceptions) == 2
902-
message = 'One or more errors occurred.'
903-
s = str(c)
904-
assert s[0:len(message)] == message
905902

906903
def test_case_sensitive():
907904
"""Test that case-sensitivity is respected. GH#81"""

‎src/tests/test_sysargv.py‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import sys
44
from subprocess import check_output
5+
from ast import literal_eval
56

67

78
def test_sys_argv_state(filepath):
@@ -11,5 +12,5 @@ def test_sys_argv_state(filepath):
1112

1213
script = filepath("argv-fixture.py")
1314
out = check_output([sys.executable, script, "foo", "bar"])
14-
assert b"foo" in out
15-
assert b"bar" in out
15+
out = literal_eval(out.decode("ascii"))
16+
assert out[-2:] == ["foo", "bar"]

0 commit comments

Comments
 (0)