Commits

holger krekel committed 9eab019

put funcarg to global level so that "--funcargs" shows it.

  • Participants
  • Parent commits ac18974

Comments (0)

Files changed (2)

File pytest_capturelog.py

 
         return report
 
-    def pytest_funcarg__capturelog(self, request):
-        """Returns a funcarg to access and control log capturing."""
-
-        return CaptureLogFuncArg(request._pyfuncitem.capturelog_handler)
+def pytest_funcarg__capturelog(request):
+    """Returns a funcarg to access and control log capturing."""
+    return CaptureLogFuncArg(request._pyfuncitem.capturelog_handler)
 
 
 class CaptureLogHandler(logging.StreamHandler):

File test_pytest_capturelog.py

         ''')
     result = testdir.runpytest()
     assert result.ret == 0
+
+def test_funcarg_help(testdir):
+    result = testdir.runpytest("--funcargs")
+    result.stdout.fnmatch_lines([
+        "*capturelog*",
+    ])