File tree Expand file tree Collapse file tree 3 files changed +10
-10
lines changed
Expand file tree Collapse file tree 3 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 1717from pathlib import Path
1818from pathlib import PurePath
1919from typing import Callable
20+ from typing import DefaultDict
2021from typing import Dict
2122from typing import IO
2223from typing import Iterable
@@ -668,9 +669,9 @@ def __init__(
668669 else :
669670 self .enable_assertion_pass_hook = False
670671 self .source = source
671- self .scope : tuple [ast .AST , ...] = ()
672- self .variables_overwrite : defaultdict [
673- tuple [ast .AST , ...], Dict [str , str ]
672+ self .scope : Tuple [ast .AST , ...] = ()
673+ self .variables_overwrite : DefaultDict [
674+ Tuple [ast .AST , ...], Dict [str , str ]
674675 ] = defaultdict (dict )
675676
676677 def run (self , mod : ast .Module ) -> None :
Original file line number Diff line number Diff line change 6060from _pytest .deprecated import INSTANCE_COLLECTOR
6161from _pytest .deprecated import NOSE_SUPPORT_METHOD
6262from _pytest .fixtures import _get_direct_parametrize_args
63- from _pytest .fixtures import FixtureDef
6463from _pytest .fixtures import FuncFixtureInfo
6564from _pytest .fixtures import get_scope_node
6665from _pytest .fixtures import IdentityFixtureDef
@@ -1189,7 +1188,7 @@ def id(self) -> str:
11891188
11901189
11911190# Used for storing pseudo fixturedefs for direct parametrization.
1192- name2pseudofixturedef_key = StashKey [Dict [str , FixtureDef [Any ]]]()
1191+ name2pseudofixturedef_key = StashKey [Dict [str , IdentityFixtureDef [Any ]]]()
11931192
11941193
11951194@final
@@ -1379,7 +1378,7 @@ def parametrize(
13791378 if node is None :
13801379 name2pseudofixturedef = None
13811380 else :
1382- default : Dict [str , FixtureDef [Any ]] = {}
1381+ default : Dict [str , IdentityFixtureDef [Any ]] = {}
13831382 name2pseudofixturedef = node .stash .setdefault (
13841383 name2pseudofixturedef_key , default
13851384 )
Original file line number Diff line number Diff line change @@ -4571,8 +4571,8 @@ def test(fixture2):
45714571 assert fixture2 in (4, 5)
45724572 """
45734573 )
4574- res = pytester .inline_run ()
4575- res .assertoutcome (passed = 2 )
4574+ res = pytester .runpytest ()
4575+ res .assert_outcomes (passed = 2 )
45764576
45774577
45784578def test_reordering_after_dynamic_parametrize (pytester : Pytester ):
@@ -4720,8 +4720,8 @@ def test(fm):
47204720 assert calls[6].kwargs["parentnode"].nodeid.endswith("test")
47214721 """
47224722 )
4723- reprec = pytester .inline_run ()
4724- reprec .assertoutcome (passed = 6 )
4723+ reprec = pytester .runpytest ()
4724+ reprec .assert_outcomes (passed = 6 )
47254725
47264726
47274727def test_deduplicate_names () -> None :
You can’t perform that action at this time.
0 commit comments