Skip to content

Commit 81b936b

Browse files
committed
README updates + add click to test requirements
1 parent 5164c13 commit 81b936b

3 files changed

Lines changed: 19 additions & 1 deletion

File tree

README.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,13 @@ To test all cachier backends (MongoDB, Redis, SQL, Memory, Pickle) locally with
630630
# Keep containers running for debugging
631631
./scripts/test-local.sh all -k
632632
633-
The unified test script automatically manages Docker containers, installs required dependencies, and runs the appropriate test suites. See ``scripts/README-local-testing.md`` for detailed documentation.
633+
# Test specific test files with selected backends
634+
./scripts/test-local.sh mongo -f tests/test_mongo_core.py
635+
636+
# Test multiple files across all backends
637+
./scripts/test-local.sh all -f tests/test_main.py -f tests/test_redis_core_coverage.py
638+
639+
The unified test script automatically manages Docker containers, installs required dependencies, and runs the appropriate test suites. The ``-f`` / ``--files`` option allows you to run specific test files instead of the entire test suite. See ``scripts/README-local-testing.md`` for detailed documentation.
634640

635641

636642
Adding documentation

scripts/README-local-testing.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ This guide explains how to run cachier tests locally with Docker containers for
4040
- `-v, --verbose` - Show verbose pytest output
4141
- `-k, --keep-running` - Keep Docker containers running after tests
4242
- `-h, --html-coverage` - Generate HTML coverage report
43+
- `-f, --files` - Specify test files to run (can be used multiple times)
4344
- `--help` - Show help message
4445

4546
## Examples
@@ -86,6 +87,15 @@ make test-sql-local
8687

8788
# Using environment variable
8889
CACHIER_TEST_CORES="mongo redis" ./scripts/test-local.sh
90+
91+
# Test specific files with MongoDB backend
92+
./scripts/test-local.sh mongo -f tests/test_mongo_core.py
93+
94+
# Test multiple files across all backends
95+
./scripts/test-local.sh all -f tests/test_main.py -f tests/test_redis_core_coverage.py
96+
97+
# Combine file selection with other options
98+
./scripts/test-local.sh redis sql -f tests/test_sql_core.py -v -k
8999
```
90100

91101
### Docker Compose

tests/requirements.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ pygments
1010
# the memory core tests dataframe caching
1111
pandas
1212
pympler
13+
# for cli tests
14+
click

0 commit comments

Comments
 (0)