Azure / Azure/azure-sdk-for-python

Create `record` command for `azpysdk` CLI

Open
#44,277 0 comments 0 reactions 1 assignee Claimed by @laiapat View on GitHub
EngSys
Dominant language
Python
Stars
5.6k
Forks
3.4k
Avg merge
1d 21h
Merged PRs (30d)
193

Description

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.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.