Permalink
Browse files

Add test capturing expectation of multiple calls to using_module

  • Loading branch information...
1 parent 792c7b9 commit 045cacc8baa2b75f0f5e82e6de02226e55e1bd5b @jaraco committed Nov 14, 2012
Showing with 8 additions and 0 deletions.
  1. +8 −0 test_path.py
View
@@ -141,6 +141,14 @@ def testExplicitModule(self):
self.assertEqual(nt_ok / 'quux', r'foo\bar\baz\quux')
self.assertEqual(posix_ok / 'quux', r'foo/bar/baz/quux')
+ def testExplicitModuleClasses(self):
+ """
+ multiple calls to path.using_module should produce the same class.
+ """
+ nt_path = path.using_module(ntpath)
+ self.assert_(nt_path is path.using_module(ntpath))
+ self.assertEqual(nt_path.__name__, 'path_ntpath')
+
class ReturnSelfTestCase(unittest.TestCase):
def setUp(self):
# Create a temporary directory.

0 comments on commit 045cacc

Please sign in to comment.