File: fix-test-for-python3.8.patch

package info (click to toggle)
python-parameterized 0.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 284 kB
  • sloc: python: 735; makefile: 3
file content (16 lines) | stat: -rw-r--r-- 657 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
https://github.com/wolever/parameterized/pull/75

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")