Exemplo n.º 1
0
 def test_module(self):
     # hand it a module and see if it uses the parent directory
     # of the module.
     path = catalog.catalog_path(os.__file__)
     d,f = os.path.split(os.__file__)
     d2,f = os.path.split(path)
     assert_(d2 == d)
Exemplo n.º 2
0
 def test_module(self):
     # hand it a module and see if it uses the parent directory
     # of the module.
     path = catalog.catalog_path(os.__file__)
     d, f = os.path.split(os.__file__)
     d2, f = os.path.split(path)
     assert_(d2 == d)
Exemplo n.º 3
0
 def test_user(path):
     if sys.platform != 'win32':
         in_path = '~'
         path = catalog.catalog_path(in_path)
         d,f = os.path.split(path)
         assert_(d == os.path.expanduser(in_path))
         assert_(f == catalog.os_dependent_catalog_name())
Exemplo n.º 4
0
 def test_user(path):
     if sys.platform != 'win32':
         in_path = '~'
         path = catalog.catalog_path(in_path)
         d, f = os.path.split(path)
         assert_(d == os.path.expanduser(in_path))
         assert_(f == catalog.os_dependent_catalog_name())
Exemplo n.º 5
0
 def test_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert_(path is None)
Exemplo n.º 6
0
 def test_path(self):
     # use os.__file__ to get a usable directory.
     in_path,f = os.path.split(os.__file__)
     path = catalog.catalog_path(in_path)
     d,f = os.path.split(path)
     assert_(d == in_path)
Exemplo n.º 7
0
 def test_current(self):
     in_path = '.'
     path = catalog.catalog_path(in_path)
     d,f = os.path.split(path)
     assert_(d == os.path.abspath(in_path))
     assert_(f == catalog.os_dependent_catalog_name())
Exemplo n.º 8
0
 def test_default(self):
     in_path = catalog.default_dir()
     path = catalog.catalog_path(in_path)
     d,f = os.path.split(path)
     assert_(d == in_path)
     assert_(f == catalog.os_dependent_catalog_name())
Exemplo n.º 9
0
 def test_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert_(path is None)
Exemplo n.º 10
0
 def test_path(self):
     # use os.__file__ to get a usable directory.
     in_path, f = os.path.split(os.__file__)
     path = catalog.catalog_path(in_path)
     d, f = os.path.split(path)
     assert_(d == in_path)
Exemplo n.º 11
0
 def test_current(self):
     in_path = '.'
     path = catalog.catalog_path(in_path)
     d, f = os.path.split(path)
     assert_(d == os.path.abspath(in_path))
     assert_(f == catalog.os_dependent_catalog_name())
Exemplo n.º 12
0
 def test_default(self):
     in_path = catalog.default_dir()
     path = catalog.catalog_path(in_path)
     d, f = os.path.split(path)
     assert_(d == in_path)
     assert_(f == catalog.os_dependent_catalog_name())