Skip to content

Commit

Permalink
use pyvcr to record requests
Browse files Browse the repository at this point in the history
  • Loading branch information
dbatten5 committed Oct 27, 2021
1 parent 6e66f25 commit 0ade3b6
Show file tree
Hide file tree
Showing 23 changed files with 3,777 additions and 1,347 deletions.
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ def mypy(session: Session) -> None:
def tests(session: Session) -> None:
"""Run the test suite."""
session.install(".")
session.install("coverage[toml]", "pytest", "pygments")
session.install("coverage[toml]", "pytest", "pygments", "vcrpy")
try:
session.run("coverage", "run", "--parallel", "-m", "pytest", *session.posargs)
finally:
Expand All @@ -152,7 +152,7 @@ def coverage(session: Session) -> None:
def typeguard(session: Session) -> None:
"""Runtime type checking using Typeguard."""
session.install(".")
session.install("pytest", "typeguard", "pygments")
session.install("pytest", "typeguard", "pygments", "vcrpy")
session.run("pytest", f"--typeguard-packages={package}", *session.posargs)


Expand Down
251 changes: 250 additions & 1 deletion poetry.lock

Large diffs are not rendered by default.

4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ mkdocs-material-extensions = "^1.0.3"
mkdocs-minify-plugin = "^0.5.0"
mkdocstrings = "^0.16.2"
types-requests = "^2.25.11"
vcrpy = "^4.1.1"

[tool.poetry.scripts]
phylm = "phylm.__main__:main"
Expand All @@ -78,9 +79,10 @@ show_column_numbers = true
show_error_codes = true
show_error_context = true
implicit_reexport = true
disallow_untyped_decorators = false

[[tool.mypy.overrides]]
module = ["imdb", "imdb.Movie", "bs4", "bs4.element", "requests"]
module = ["imdb", "imdb.Movie", "bs4", "bs4.element", "requests", "vcr"]
ignore_missing_imports = true

[tool.isort]
Expand Down
2 changes: 2 additions & 0 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
"""Module to hold fixtures etc. for pytest."""

FIXTURES_DIR = "tests/fixtures/vcr_cassettes"
Empty file removed tests/data/__init__.py
Empty file.
Empty file removed tests/data/mtc/__init__.py
Empty file.
173 changes: 0 additions & 173 deletions tests/data/mtc/matrix_results.html

This file was deleted.

39 changes: 0 additions & 39 deletions tests/data/mtc/no_results.html

This file was deleted.

Empty file removed tests/data/rt/__init__.py
Empty file.
Loading

0 comments on commit 0ade3b6

Please sign in to comment.