Silence warning given on gevent / support django 4.1 in tests.

This commit is contained in:
Fabio Zadrozny 2022-09-29 16:45:59 -03:00
parent 30a96bf6e8
commit ac6f5ea6c9
3 changed files with 10 additions and 3 deletions

View file

@ -49,7 +49,13 @@ def _internal_set_trace(tracing_func):
frame = get_frame()
if frame is not None and frame.f_back is not None:
filename = frame.f_back.f_code.co_filename.lower()
if not filename.endswith('threading.py') and not filename.endswith('pydevd_tracing.py'):
if not filename.endswith(
(
'threading.py',
'pydevd_tracing.py',
'threadpool.py', # This is from gevent.
)
):
message = \
'\nPYDEV DEBUGGER WARNING:' + \

View file

@ -487,10 +487,10 @@ def case_setup_django(debugger_runner_simple):
version = [int(x) for x in django.get_version().split('.')][:2]
if version == [1, 7]:
django_folder = 'my_django_proj_17'
elif version in ([2, 1], [2, 2], [3, 0], [3, 1], [3, 2], [4, 0]):
elif version in ([2, 1], [2, 2], [3, 0], [3, 1], [3, 2], [4, 0], [4, 1]):
django_folder = 'my_django_proj_21'
else:
raise AssertionError('Can only check django 1.7, 2.1, 2.2, 3.0, 3.1, 3.2 and 4.0 right now. Found: %s' % (version,))
raise AssertionError('Can only check django 1.7 -> 4.1 right now. Found: %s' % (version,))
WriterThread.DJANGO_FOLDER = django_folder
for key, value in kwargs.items():

View file

@ -4106,6 +4106,7 @@ def test_gevent_show_paused_greenlets(case_setup, show):
@pytest.mark.skipif(not TEST_GEVENT, reason='Gevent not installed.')
@pytest.mark.skipif(sys.platform == 'win32', reason='tput requires Linux.')
def test_gevent_subprocess_not_python(case_setup):
def get_environ(writer):