stac-utils / pystac

Python library for working with any SpatioTemporal Asset Catalog (STAC)
https://pystac.readthedocs.io
Other
346 stars 116 forks source link

Use pytest fixtures #948

Open pjhartzell opened 1 year ago

pjhartzell commented 1 year ago

Since pystac is switching to pytest for testing (#939), we should look at using pytest's fixtures.

jsignell commented 1 year ago

Just a note that the fixtures currently defined in conftest.py start with test_ which is have pretty non-standard naming. I think something like default_item or simple_item or even just item would be more typical.

gadomski commented 1 year ago

Another note: per https://github.com/stac-utils/pystac/pull/1001#discussion_r1115658197, we should find meaningful names for each test fixture that is created from the test cases. Right now the test cases are numbered 1-8, but if we dig in to each test case, we should be able to come up with a more descriptive name that makes it clear what scenario(s) test case is trying to exercise.