From 1842e2038ae123e16601e083a553fe931f34fbd0 Mon Sep 17 00:00:00 2001 From: Petr Viktorin Date: Fri, 21 Jun 2019 15:36:25 +0200 Subject: [PATCH] tests: Update unittest local variable name for Python 3.8 --- parameterized/test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/parameterized/test.py b/parameterized/test.py index 5e506f5..6b8e4d2 100644 --- a/parameterized/test.py +++ b/parameterized/test.py @@ -252,7 +252,8 @@ def _assert_docstring(self, expected_docstring, rstrip=False): f_locals = stack[3][0].f_locals test_method = ( f_locals.get("testMethod") or # Py27 - f_locals.get("function") # Py33 + f_locals.get("function") or # Py33 + f_locals.get("method") # Py38 ) if test_method is None: raise AssertionError("uh oh, unittest changed a local variable name")