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)
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)
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())
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())
def test_bad_path(self): # stupid_path_name in_path = 'stupid_path_name' path = catalog.catalog_path(in_path) assert_(path is None)
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)
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())
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())
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)
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())
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())