コード例 #1
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 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())
コード例 #2
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 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)
コード例 #3
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 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)
コード例 #4
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 def test_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert_(path is None)
コード例 #5
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 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)
コード例 #6
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 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())
コード例 #7
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 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())
コード例 #8
0
ファイル: test_catalog.py プロジェクト: zanellia/weave
 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())
コード例 #9
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 def check_bad_path(self):
     # stupid_path_name
     in_path = 'stupid_path_name'
     path = catalog.catalog_path(in_path)
     assert (path is None)
コード例 #10
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 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)
コード例 #11
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 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())
コード例 #12
0
ファイル: test_catalog.py プロジェクト: mbentz80/jzigbeercp
 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())
コード例 #13
0
ファイル: test_catalog.py プロジェクト: apetcho/weave
 def test_bad_path(self):
     # stupid_path_name
     in_path = "stupid_path_name"
     path = catalog.catalog_path(in_path)
     assert_(path is None)
コード例 #14
0
ファイル: test_catalog.py プロジェクト: apetcho/weave
 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())
コード例 #15
0
ファイル: test_catalog.py プロジェクト: apetcho/weave
 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())