Skip to content

t.vect.db.select: Add pytest files - #7574

Merged
petrasovaa merged 2 commits into
OSGeo:mainfrom
saket0187:Add-tests-in-t.vect.db.select
Jun 18, 2026
Merged

petrasovaa merged 2 commits into
OSGeo:mainfrom
saket0187:Add-tests-in-t.vect.db.select

Conversation

@saket0187

Copy link
Copy Markdown
Contributor

This PR replaces old tests with pytest , which will allow us to complete #7530 .

@saket0187 saket0187 changed the title t.vect.db.select: Add pytest t.vect.db.select: Add pytest files Jun 15, 2026
@github-actions github-actions Bot added temporal Related to temporal data processing Python Related code is in Python module tests Related to Test Suite labels Jun 15, 2026
@petrasovaa

Copy link
Copy Markdown
Contributor

@echoix it looks like the fixture runs twice although it's a module level fixture, can we prevent that?

2026-06-15T10:31:05.6217830Z ============================== slowest durations ===============================
2026-06-15T10:31:05.6219290Z 21.74s setup    temporal/t.vect.db.select/tests/t_vect_db_select_test.py::test_t_vect_db_select_interval_columns
2026-06-15T10:31:05.6221320Z 16.23s setup    temporal/t.vect.db.select/tests/t_vect_db_select_test.py::test_t_vect_db_select_interval_default

@saket0187 the setup runs too long, we might not be able to do much about that, but try lowering the number of maps to see if that makes at least little bit of difference.

@echoix

echoix commented Jun 16, 2026

Copy link
Copy Markdown
Member

Is there a fixture with the same name up in a parent contest.py?

From what I remember, a non negligible time is taken only to import the temporal Python modules (the file generated for ctypes), plus the init that is long. It ends up going through almost everything just to "start".

@saket0187

Copy link
Copy Markdown
Contributor Author

I've updated the conftest.py fixture, lowering the generated maps from 6 to 3 and the random points from 5 to 3. This cut the total test execution time down to roughly 10–11 seconds on my end.

@petrasovaa
petrasovaa merged commit 90764a1 into OSGeo:main Jun 18, 2026
26 checks passed
@github-project-automation github-project-automation Bot moved this from In Progress to Done in GRASS Google Summer of Code 2026 Jun 18, 2026
@github-actions github-actions Bot added this to the 8.6.0 milestone Jun 18, 2026
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

module Python Related code is in Python temporal Related to temporal data processing tests Related to Test Suite

Development

Successfully merging this pull request may close these issues.

3 participants