Skip to content

Commit 86669a5

Browse files
committed
testStrOfException was depending on implementation detail that was half-way through an Exception.StackTrace. The detail changed in Windows .NET 2.0+, so now it checks the base of the trace ("System.Convert.ToDateTime").
1 parent 5b6eb9e commit 86669a5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pythonnet/src/tests/test_exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ def testStrOfException(self):
305305
Convert.ToDateTime('this will fail')
306306
except FormatException, e:
307307
msg = unicode(e).encode("utf8") # fix for international installation
308-
self.failUnless(msg.find('System.DateTime.Parse') > -1, msg)
308+
self.failUnless(msg.find('System.Convert.ToDateTime') > -1, msg)
309309

310310

311311
def testPythonCompatOfManagedExceptions(self):

0 commit comments

Comments
 (0)