Beispiel #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())
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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)
Beispiel #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())
Beispiel #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())
Beispiel #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())
Beispiel #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)
Beispiel #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)
Beispiel #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())
Beispiel #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())
Beispiel #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)
Beispiel #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())
Beispiel #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())