# How to Test a Single File Under Pytest

To run a single test file with pytest, use the command `pytest` followed by the file path:

```command
pytest tests/test_file.py
```

To execute a specific test within that file, append `::` and the test name to the file path:

```command
pytest tests/test_file.py::test_name
```
