Spaces:
Running on CPU Upgrade
Running on CPU Upgrade
Download tests/api/conftest.py from marvin-cusm-chatbot/champ-chatbot: direct link, hf CLI and curl.
- Browser
- Download file 423 Bytes
-
https://huggingface.co/spaces/marvin-cusm-chatbot/champ-chatbot/resolve/main/tests/api/conftest.py
- Command line
-
hf download hf://spaces/marvin-cusm-chatbot/champ-chatbot/tests/api/conftest.py
-
curl -L -o conftest.py https://huggingface.co/spaces/marvin-cusm-chatbot/champ-chatbot/resolve/main/tests/api/conftest.py
423 Bytes
| # tests/api/conftest.py | |
| import pytest | |
| from main import limiter | |
| def disable_rate_limit(request): | |
| """Disable rate limiting for all tests""" | |
| # Do not disable the rate limiter if the test is marked with enable_rate_limit | |
| if "enable_rate_limit" in request.keywords: | |
| yield | |
| else: | |
| limiter.enabled = False | |
| yield | |
| limiter.enabled = True | |