Update src/_pytest/assertion/rewrite.py

Co-authored-by: Ran Benita <ran@unusedvar.com>
This commit is contained in:
Bruno Oliveira 2022-02-04 19:07:52 -03:00 committed by Ran Benita
parent 66dc79efd4
commit f86a87a315
1 changed files with 3 additions and 1 deletions

View File

@ -44,7 +44,9 @@ from _pytest.stash import StashKey
if TYPE_CHECKING:
from _pytest.assertion import AssertionState
if sys.version_info >= (3, 10):
if sys.version_info >= (3, 11):
from importlib.resources.readers import FileReader
elif sys.version_info >= (3, 10):
from importlib.readers import FileReader
assertstate_key = StashKey["AssertionState"]()