Commits

Ronny Pfannschmidt committed c8b42ee

fix fnmatch-python-names patch

  • Participants
  • Parent commits 9a47295

Comments (0)

Files changed (1)

File fnmatch-python-test-names

 # HG changeset patch
-# Parent b8f6abd0c27fdd6b13bd67d072d390b10d682464
+# Parent e81ac81a7b6368940aab63d97a17db16f7a163ee
+
 diff --git a/_pytest/python.py b/_pytest/python.py
 --- a/_pytest/python.py
 +++ b/_pytest/python.py
  import pytest
 +import fnmatch
  from py._code.code import TerminalRepr
+ from _pytest.monkeypatch import monkeypatch
  
- import _pytest
-@@ -163,11 +164,15 @@ class PyCollectorMixin(PyobjMixin, pytes
+@@ -181,11 +182,15 @@ class PyCollectorMixin(PyobjMixin, pytes
          for prefix in self.config.getini("python_functions"):
              if name.startswith(prefix):
                  return True
 diff --git a/testing/test_python.py b/testing/test_python.py
 --- a/testing/test_python.py
 +++ b/testing/test_python.py
-@@ -1301,8 +1301,8 @@ def test_customized_python_discovery(tes
+@@ -1448,8 +1448,8 @@ def test_customized_python_discovery(tes
      testdir.makeini("""
          [pytest]
          python_files=check_*.py
      """)
      p = testdir.makepyfile("""
          def check_simple():
-@@ -1310,6 +1310,9 @@ def test_customized_python_discovery(tes
+@@ -1457,6 +1457,9 @@ def test_customized_python_discovery(tes
          class CheckMyApp:
              def check_meth(self):
                  pass
      """)
      p2 = p.new(basename=p.basename.replace("test", "check"))
      p.move(p2)
-@@ -1319,12 +1322,14 @@ def test_customized_python_discovery(tes
+@@ -1466,12 +1469,14 @@ def test_customized_python_discovery(tes
          "*check_simple*",
          "*CheckMyApp*",
          "*check_meth*",
-+        "*DescribeFun*",
-+        "*this_should_work*",
++        "*Describe*",
++        "*_should_*",
      ])
-     
+ 
      result = testdir.runpytest()
      assert result.ret == 0
      result.stdout.fnmatch_lines([