55from functools import wraps
66
77from varname import core
8- from varname .ignore import IgnoreList
8+ # from varname.ignore import IgnoreList
99
1010import pytest
1111from varname import config , ignore
1212
13+
1314@pytest .fixture
1415def no_getframe ():
1516 """
@@ -26,6 +27,7 @@ def getframe(_context):
2627 finally :
2728 sys ._getframe = orig_getframe
2829
30+
2931@pytest .fixture
3032def no_get_node_by_frame ():
3133 """
@@ -42,6 +44,7 @@ def get_node_by_frame(frame):
4244 finally :
4345 core .get_node_by_frame = orig_get_node_by_frame
4446
47+
4548@pytest .fixture
4649def no_pure_eval ():
4750 sys .modules ['pure_eval' ] = None
@@ -50,6 +53,7 @@ def no_pure_eval():
5053 finally :
5154 del sys .modules ['pure_eval' ]
5255
56+
5357@pytest .fixture
5458def enable_debug ():
5559 config .debug = True
@@ -58,6 +62,7 @@ def enable_debug():
5862 finally :
5963 config .debug = False
6064
65+
6166@pytest .fixture
6267def frame_matches_module_by_ignore_id_false ():
6368 orig_frame_matches_module_by_ignore_id = ignore .frame_matches_module_by_ignore_id
@@ -67,6 +72,7 @@ def frame_matches_module_by_ignore_id_false():
6772 finally :
6873 ignore .frame_matches_module_by_ignore_id = orig_frame_matches_module_by_ignore_id
6974
75+
7076def run_async (coro ):
7177 if sys .version_info < (3 , 7 ):
7278 loop = asyncio .get_event_loop ()
@@ -92,12 +98,14 @@ def module_from_source(name, source, tmp_path):
9298 spec .loader .exec_module (module )
9399 return module
94100
101+
95102def decor (func ):
96103 """Decorator just for test purpose"""
97104 def wrapper (* args , ** kwargs ):
98105 return func (* args , ** kwargs )
99106 return wrapper
100107
108+
101109def decor_wraps (func ):
102110 @wraps (func )
103111 def wrapper (* args , ** kwargs ):
0 commit comments