Azure / Azure/azure-sdk-for-python
Create `record` command for `azpysdk` CLI
- Lingua principale
- Python
- Stelle
- 5.6k
- Fork
- 3.4k
- Merge medio
- 2g
- PR unite (30g)
- 217
Descrizione
We should support recording both tests and samples via a `record` verb in the `azpysdk` CLI. For example:
```python
# Record pytest tests
azpysdk record test /path/to/test_file.py
# Record pytest tests with arguments
azpysdk record test /path/to/tests/ --pytest-args -v -k "test_name"
# Record a code sample
azpysdk record sample /path/to/sample.py
```
This should use our existing test recording infrastructure, e.g. `@recorded_by_proxy`, and adjust the environment as necessary to support sample recording in cases where the tooling is `pytest`-dependent. If it makes sense to decouple `pytest` from our tooling in some places, we can do that as part of this effort. For example, recording files are currently determined based on the `PYTEST_CURRENT_TEST` variable; we can either set this ourselves for samples or find another approach.
Guida per i contributori
Apri la guida per i contributori
Valutazione
Questa issue non è ancora stata valutata.