File tree Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Expand file tree Collapse file tree 1 file changed +0
-36
lines changed Original file line number Diff line number Diff line change 19
19
20
20
pytestmark = [pytest .mark .single_cpu ]
21
21
22
- """
23
- # XXX Some tests fail in the CI because an empty .pyiceberg file is found.
24
- # Checking here before importing the pyiceberg module, to provide better
25
- # error message
26
- import os
27
-
28
- def check_pyiceberg_yaml_file():
29
- import strictyaml
30
-
31
- PYICEBERG_HOME = "PYICEBERG_HOME"
32
- search_dirs = [os.environ.get(PYICEBERG_HOME), os.path.expanduser("~"), os.getcwd()]
33
- for dir_ in search_dirs:
34
- path = None
35
- exists = False
36
- content = None
37
- if dir_:
38
- path = pathlib.Path(dir_) / ".pyiceberg.yaml"
39
- exists = path.exists()
40
- if exists:
41
- with open(path, encoding="utf-8") as f:
42
- yml_str = f.read()
43
- content = strictyaml.load(yml_str).data
44
- raise RuntimeError(
45
- ".pyiceberg.yaml file already exists\n "
46
- f"Path: {path}\n Content:\n {content}"
47
- )
48
-
49
- try:
50
- import strictyaml
51
- except ImportError:
52
- pass
53
- else:
54
- check_pyiceberg_yaml_file()
55
- # XXX End checks
56
- """
57
-
58
22
pyiceberg = pytest .importorskip ("pyiceberg" )
59
23
pyiceberg_catalog = pytest .importorskip ("pyiceberg.catalog" )
60
24
pq = pytest .importorskip ("pyarrow.parquet" )
You can’t perform that action at this time.
0 commit comments