-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔨 Removes
respx
library from base requirements listing (`fastapi.in…
…`) (#5003)
- Loading branch information
Showing
10 changed files
with
70 additions
and
19 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,5 +8,4 @@ | |
|
||
fastapi | ||
httpx | ||
respx | ||
uvicorn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import re | ||
import sys | ||
from pathlib import Path | ||
|
||
import pytest | ||
|
||
CURRENT_DIR = Path(sys.argv[0] if __name__ == "__main__" else __file__).resolve().parent | ||
REPO_DIR = CURRENT_DIR.parent.parent | ||
assert any(REPO_DIR.glob(".git")) | ||
|
||
SERVICES_DIR = REPO_DIR / "services" | ||
assert SERVICES_DIR.exists() | ||
|
||
|
||
@pytest.mark.parametrize( | ||
"exclude", | ||
[ | ||
"aioresponses", | ||
"coverage", | ||
"flaky", | ||
"hypothesis", | ||
"pytest", # NOTE: this includes all pytest plugins since they are named as pytest-* | ||
"moto", | ||
"respx", | ||
], | ||
) | ||
@pytest.mark.parametrize( | ||
"base_path", | ||
SERVICES_DIR.rglob("_base.txt"), | ||
ids=lambda p: f"{p.relative_to(SERVICES_DIR)}", | ||
) | ||
def test_libraries_are_not_allowed_in_base_requirements(base_path: Path, exclude: str): | ||
requirements_text = re.sub( | ||
r"(^|\s)(#.*|\n)", "", base_path.read_text().lower(), flags=re.MULTILINE | ||
) | ||
assert exclude not in requirements_text |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters