Skip to content

Commit ee61079

Browse files
Making pyiceberg tests run in a single cpu
1 parent 8c1e4dc commit ee61079

File tree

1 file changed

+1
-46
lines changed

1 file changed

+1
-46
lines changed

pandas/tests/io/test_iceberg.py

Lines changed: 1 addition & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,6 @@
33
44
Tests in this file use a simple Iceberg catalog based on SQLite, with the same
55
data used for Parquet tests (``pandas/tests/io/data/parquet/simple.parquet``).
6-
7-
The next code has been used to generate the Iceberg catalog:
8-
9-
```python
10-
import pyarrow.parquet as pq
11-
from pyiceberg.catalog import load_catalog
12-
13-
warehouse = "pandas/tests/io/data/iceberg"
14-
catalog = load_catalog(
15-
"default",
16-
**{
17-
"type": "sql",
18-
"uri": f"sqlite:///{warehouse}/catalog.sqlite",
19-
"warehouse": f"file://{warehouse}",
20-
},
21-
)
22-
catalog.create_namespace("default")
23-
df = pq.read_table("pandas/tests/io/data/parquet/simple.parquet")
24-
table = catalog.create_table("default.simple", schema=df.schema)
25-
table.append(df)
26-
```
276
"""
287

298
from contextlib import contextmanager
@@ -38,31 +17,7 @@
3817

3918
from pandas.io.iceberg import read_iceberg
4019

41-
42-
# TODO: Remove this before merging
43-
# Using to gather information about the CI errors that don't reproduce locally
44-
import os
45-
import pprint
46-
import strictyaml
47-
48-
PYICEBERG_HOME = "PYICEBERG_HOME"
49-
search_dirs = [os.environ.get(PYICEBERG_HOME), os.path.expanduser("~"), os.getcwd()]
50-
data = [".pyiceberg locations:"]
51-
for dir_ in search_dirs:
52-
path = None
53-
exists = False
54-
content = None
55-
if dir_:
56-
path = pathlib.Path(dir_) / ".pyiceberg.yaml"
57-
exists = path.exists()
58-
if exists:
59-
with open(path, encoding="utf-8") as f:
60-
yml_str = f.read()
61-
content = strictyaml.load(yml_str).data
62-
data.append((path, exists, content))
63-
64-
raise RuntimeError(pprint.pformat(data))
65-
# TODO end
20+
pytestmark = [pytest.mark.single_cpu]
6621

6722
pyiceberg = pytest.importorskip("pyiceberg")
6823
pyiceberg_catalog = pytest.importorskip("pyiceberg.catalog")

0 commit comments

Comments
 (0)