Skip to content
This repository has been archived by the owner on Sep 1, 2024. It is now read-only.

Commit

Permalink
Add py package as explicit dev dependency
Browse files Browse the repository at this point in the history
It appears that this was previously a transitive dependency of
one of the other packages installed in the tox environment, but is
no longer (most likely due to the package being deprecated). This
plugin only depends on the package for mypy typing and for backward
compatibility with versions of PyTest prior to 7.0.
  • Loading branch information
ramosbugs committed Oct 26, 2022
1 parent a31066e commit e0e4ab4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ dev =
flake8
flake8-quotes
mypy
py>=1.9.0
pytest-xdist>=2.0.0
requests-mock[fixture]
types-requests
Expand Down
5 changes: 3 additions & 2 deletions src/pytest_unflakable/_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import logging
import pprint

import py
import pytest
import _pytest
import sys
Expand All @@ -27,6 +26,7 @@
)

if TYPE_CHECKING:
import py
from typing import Literal

# Most of these types aren't defined or exported in older versions of pytest, but we only need
Expand All @@ -35,15 +35,16 @@
CallPhase = Literal['setup', 'call', 'teardown']
CollectReport = pytest.CollectReport
Config = pytest.Config
PathCompat = Union[py.path.local, Path]
else:
CallInfo = object
CallPhase = str
CollectReport = object
Config = object
PathCompat = object

TestPathAndName = Tuple[str, Tuple[str, ...]]
QuarantinedTests = Set[TestPathAndName]
PathCompat = Union[py.path.local, Path]


class QuarantineMode(Enum):
Expand Down

0 comments on commit e0e4ab4

Please sign in to comment.