Skip to content

Commit 31e8ed1

Browse files
committed
feat: add testing utilities for DataFrame range generation
1 parent e322521 commit 31e8ed1

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

python/tests/test_io.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,16 @@
1414
# KIND, either express or implied. See the License for the
1515
# specific language governing permissions and limitations
1616
# under the License.
17+
1718
from pathlib import Path
1819

1920
import pyarrow as pa
2021
import pytest
2122
from datafusion import column
22-
from datafusion._testing import range_table
2323
from datafusion.io import read_avro, read_csv, read_json, read_parquet
2424

25+
from .utils import range_table
26+
2527

2628
def test_read_json_global_ctx(ctx):
2729
path = Path(__file__).parent.resolve()

python/datafusion/_testing.py renamed to python/tests/utils.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,9 @@
99

1010
from typing import TYPE_CHECKING
1111

12-
from .context import SessionContext
13-
1412
if TYPE_CHECKING:
1513
from datafusion import DataFrame
14+
from datafusion.context import SessionContext
1615

1716

1817
def range_table(
@@ -42,5 +41,5 @@ def range_table(
4241
start, stop = 0, start
4342

4443
parts = f", {int(partitions)}" if partitions is not None else ""
45-
sql = f"SELECT * FROM range({int(start)}, {int(stop)}, {int(step)}{parts})" # noqa: S608
44+
sql = f"SELECT * FROM range({int(start)}, {int(stop)}, {int(step)}{parts})"
4645
return ctx.sql(sql)

0 commit comments

Comments
 (0)