Просмотр исходного кода

fix: Update pytest problem matcher for tb=short (#20038)

Markus Unterwaditzer 4 лет назад
Родитель
Сommit
e836d93620
2 измененных файлов с 5 добавлено и 3 удалено
  1. 3 3
      .github/pytest.json
  2. 2 0
      setup.cfg

+ 3 - 3
.github/pytest.json

@@ -4,10 +4,10 @@
       "owner": "pytest",
       "pattern": [
         {
-          "regexp": "^Traceback"
+          "regexp": "^____"
         },
         {
-          "regexp": "^\\s+File\\s\"(.*)\",\\sline\\s(\\d+),\\sin\\s(.*)$",
+          "regexp": "^(.*):(\\d+):\\sin\\s(.*)$",
           "file": 1,
           "line": 2
         },
@@ -15,7 +15,7 @@
           "regexp": "^\\s+.*"
         },
         {
-          "regexp": "^(\\w+Error:.*)",
+          "regexp": "^E\\s+(.*)$",
           "message": 1,
           "loop": true
         }

+ 2 - 0
setup.cfg

@@ -1,5 +1,7 @@
 [tool:pytest]
 python_files = test*.py
+# Note: When updating pytest tweaks, make sure to update getsentry
+# When updating the traceback format, make sure to update .github/pytest.json
 addopts = --tb=short -p no:doctest -p no:warnings
 norecursedirs = bin dist docs htmlcov script hooks node_modules .* {args}
 looponfailroots = src tests