コード例 #1
0
 def test_sanitize_from_two_paths(self):
     # check for more than one path
     p1 = [
         os.path.join("not", "a", "real", "datafile.hdf5"),
         os.path.join("not", "real", "either", "datafile.hdf5"),
     ]
     p2 = [Path(p) for p in p1]
     assert _sanitize_load_args(*p1) == _sanitize_load_args(*p2)
コード例 #2
0
 def test_sanitize_from_wildcard_path(self):
     # check with wildcards
     p1 = os.path.join("not", "a", "real", "directory", "*.hdf5")
     p2 = Path(p1)
     assert _sanitize_load_args(p1) == _sanitize_load_args(p2)
コード例 #3
0
 def test_sanitize_from_user_path(self):
     # check for user "~" card expansion
     p1 = os.path.join("~", "not", "a", "real", "datafile.hdf5")
     p2 = Path(p1)
     assert _sanitize_load_args(p1) == _sanitize_load_args(p2)
コード例 #4
0
 def test_sanitize_from_simple_path(self):
     # check for basic path
     p1 = os.path.join("not", "a", "real", "datafile.hdf5")
     p2 = Path(p1)
     assert _sanitize_load_args(p1) == _sanitize_load_args(p2)