vega / altair

Declarative statistical visualization library for Python
https://altair-viz.github.io/
BSD 3-Clause "New" or "Revised" License
9.4k stars 795 forks source link

test: Adds `test-(slow|fast)` options #3555

Closed dangotbanned closed 2 months ago

dangotbanned commented 3 months ago

While working on #3547, I've been running the test suite a bunch to identify bottlenecks.

This PR provides

Impact?

Important

The default behaviour is unchanged:

# Runs all tests
>>> hatch test 

# Runs only slow tests
>>> hatch run test-slow

# Runs all tests (that are not marked @slow)
>>> hatch run test-fast
dangotbanned commented 3 months ago

These were some drive-by fixes of typing issues, fixing them here in case this stays in review for a while They would show on mypy as well, but are hidden due to https://microsoft.github.io/pyright/#/mypy-comparison?id=type-checking-unannotated-code

dangotbanned commented 2 months ago

Really neat! :) I learned a lot while reading this. Also great to have more convenient decorators for skipping tests re pyarrow and vlc.

Thanks @binste!

I've found when reading the pytest docs that they have a lot of info - but can be overwhelming at times. The docs I've added here are as much for my own benefit; as they are to simplify the test writing of others