Skip to content

Commit e662533

Browse files
committed
fix: simple readme
1 parent a8049b0 commit e662533

1 file changed

Lines changed: 33 additions & 0 deletions

File tree

pytest-pystac/README.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# pytest-pystac
2+
3+
A [pytest](https://docs.pytest.org/) plugin that provides common fixtures for testing with [PySTAC](https://github.com/stac-utils/pystac).
4+
5+
## Installation
6+
7+
```shell
8+
pip install pytest-pystac
9+
```
10+
11+
## Fixtures
12+
13+
Once installed, the following fixtures are available automatically in your tests:
14+
15+
| Fixture | Type | Description |
16+
| --- | --- | --- |
17+
| `catalog` | `Catalog` | A basic test catalog |
18+
| `collection` | `Collection` | A basic test collection with an arbitrary extent |
19+
| `item` | `Item` | A basic test item with arbitrary geometry and bbox |
20+
| `asset` | `Asset` | An asset attached to an item |
21+
| `link` | `Link` | A link attached to an item |
22+
| `sample_item` | `Item` | An item loaded from a sample JSON file |
23+
24+
A `vcr_config` fixture (module-scoped) is also provided for use with [pytest-recording](https://github.com/kiwicom/pytest-recording), which scrubs request and response headers from recorded cassettes.
25+
26+
## Utilities
27+
28+
The plugin also exposes some test utilities from `pytest_pystac`:
29+
30+
- `ARBITRARY_GEOM` -- a simple polygon geometry
31+
- `ARBITRARY_BBOX` -- bounding box derived from `ARBITRARY_GEOM`
32+
- `ARBITRARY_EXTENT` -- an `Extent` built from the arbitrary geometry
33+
- `assert_to_from_dict(stac_object_class, d)` -- asserts that a STAC object class can round-trip through `from_dict` / `to_dict`

0 commit comments

Comments
 (0)