Пример #1
0
 def test1(self):
     resolver = FuzzyResolverInternal(filemap=dict(
         {'basename': ('/a/b/basename', )}),
                                      path_module=posixpath)
     self.assertEqual((), resolver.get_matches('asename'))
     self.assertEqual(('/a/b/basename', ), resolver.get_matches('basename'))
     self.assertEqual(('/a/b/basename', ),
                      resolver.get_matches('../c/basename'))
Пример #2
0
 def test1b(self):
     resolver = FuzzyResolverInternal(filemap=dict(
         {'basename': ('/a/b/basename', )}),
                                      match_nonexact_if_unique=False,
                                      match_partially_unique=False,
                                      path_module=posixpath)
     self.assertEqual((), resolver.get_matches('asename'))
     self.assertEqual(('/a/b/basename', ), resolver.get_matches('basename'))
     self.assertEqual((), resolver.get_matches('../c/basename'))