Ejemplo n.º 1
0
 def check_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())
Ejemplo 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)
Ejemplo n.º 3
0
 def check_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)
Ejemplo n.º 4
0
 def test_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert_(path is None)
Ejemplo n.º 5
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)
Ejemplo n.º 6
0
 def test_user(path):
     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())
Ejemplo 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())
Ejemplo 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())
Ejemplo n.º 9
0
 def check_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert (path is None)
Ejemplo n.º 10
0
 def check_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)
Ejemplo n.º 11
0
 def check_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())
Ejemplo n.º 12
0
 def check_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())
Ejemplo n.º 13
0
 def test_bad_path(self):
     # stupid_path_name
     in_path = "stupid_path_name"
     path = catalog.catalog_path(in_path)
     assert_(path is None)
Ejemplo n.º 14
0
 def test_user(path):
     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())
Ejemplo n.º 15
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())