Skip to content

Commit 599f86f

Browse files
RohanDisaalxmrs
andauthored
Convert tests from unittest to pytest format (#76)
- Convert df_test.py from unittest to pytest with fixtures and markers - Convert df_integrationtest.py to pytest format with integration markers - Update sql_test.py with pytest fixtures and modern assertions - Add pytest configuration to pyproject.toml - Format all test files with pyink - Add @pytest.mark.unit, @pytest.mark.integration, @pytest.mark.gcs markers - Maintain existing project structure and Google-style docstrings Tests now use modern pytest features while respecting project guidelines. --------- Signed-off-by: Rohan Disa <[email protected]> Co-authored-by: Alex Merose <[email protected]>
1 parent 900cb5f commit 599f86f

34 files changed

+487
-10699
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ jobs:
4848
- name: Install xarray_sql
4949
run: uv sync --dev
5050
- name: Run unit tests
51-
run: uv run pytest
51+
run: uv run pytest -m "not integration"

perf_tests/compute_air.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
import xarray as xr
44
import xarray_sql as qr
55

6-
if __name__ == '__main__':
7-
air = xr.tutorial.open_dataset('air_temperature')
8-
chunks = {'time': 240}
6+
if __name__ == "__main__":
7+
air = xr.tutorial.open_dataset("air_temperature")
8+
chunks = {"time": 240}
99
air = air.chunk(chunks)
1010

1111
df = qr.read_xarray(air).compute()

0 commit comments

Comments
 (0)