milenkovicm opened a new pull request, #2838: URL: https://github.com/apache/datafusion-ballista/pull/2838
# Which issue does this PR close? N/A. This only reorganizes tests. # Rationale for this change `python/python/tests/test_context.py` had grown to ~1000 lines that covered queries, reads, UDFs, writes and config. That made it hard to find a test or see what an area covers. This PR splits it by topic and changes no test logic. # What changes are included in this PR? The test bodies moved unchanged. Each existing section of `test_context.py` became its own file: | File | Contents | |---|---| | `conftest.py` | `cluster`, `ctx` (native and Python client) and `ndjson_file` fixtures | | `_util.py` | Shared constants (`TEST_CSV`, `EXPECTED_A`, ...), xfail markers and helpers (`to_table`, `read_back`, `write_df`, ...) | | `test_context.py` | Basic queries, session config, `cluster_config` deprecation, explain and error handling | | `test_read.py` | CSV, Parquet and JSON reads, external tables, in-memory sources, `cache()` | | `test_udf.py` | UDF, UDAF and UDWF tests | | `test_write.py` | DataFrame writes, `write_table`, `INSERT INTO`, `COPY TO` | | `test_session_config.py` | Now also holds the `BallistaConfigExtension` and information_schema tests, which sit next to the other config tests | Unused imports were removed with `ruff`. The `cluster` fixture keeps `scope="module"`, so each file now starts its own test cluster. Locally the split files still run in ~20s. ## Verification - Before and after, `pytest --collect-only` gives the same count: 249 tests. - `pytest` on the affected files: 229 passed, 20 xfailed. The xfails are the existing strict xfails. - `ruff check` and `ruff format` are clean. # Are there any user-facing changes? No. Only tests changed. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
