Skip to content

Commit 80b19e6

Browse files
committed
change module.__file__ test as the filename can be any of the System dlls.
1 parent 2019762 commit 80b19e6

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/tests/test_module.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# testImplicitAssemblyLoad() passes on deprecation warning; perfect! #
1414
##clr.AddReference('System.Windows.Forms')
1515
import sys, os, string, unittest, types, warnings
16+
from fnmatch import fnmatch
1617

1718

1819
class ModuleTests(unittest.TestCase):
@@ -62,9 +63,8 @@ def testModuleInterface(self):
6263
import System
6364
self.assertEquals(type(System.__dict__), type({}))
6465
self.assertEquals(System.__name__, 'System')
65-
print (System.__file__)
66-
self.assertTrue(System.__file__.endswith("System.dll"))
67-
print (System.__doc__)
66+
# the filename can be any module from the System namespace (eg System.Data.dll or System.dll)
67+
self.assertTrue(fnmatch(System.__file__, "*System*.dll"))
6868
self.assertTrue(System.__doc__.startswith("Namespace containing types from the following assemblies:"))
6969
self.assertTrue(self.isCLRClass(System.String))
7070
self.assertTrue(self.isCLRClass(System.Int32))

0 commit comments

Comments
 (0)