Show More
@@ -84,7 +84,7 b' jobs:' | |||
|
84 | 84 | env: |
|
85 | 85 | COLUMNS: 120 |
|
86 | 86 | run: | |
|
87 | pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json | |
|
87 | pytest --color=yes -raXxs ${{ startsWith(matrix.python-version, 'pypy') && ' ' || '--cov --cov-report=xml' }} --json-report --json-report-file=./report-${{ matrix.python-version }}-${{runner.os}}.json --maxfail=15 | |
|
88 | 88 | - uses: actions/upload-artifact@v3 |
|
89 | 89 | with: |
|
90 | 90 | name: upload pytest timing reports as json |
@@ -4,8 +4,8 b'' | |||
|
4 | 4 | # |
|
5 | 5 | # Copyright (c) 2004-2021 Holger Krekel and others |
|
6 | 6 | """Discover and run ipdoctests in modules and test files.""" |
|
7 | import builtins | |
|
8 | 7 | import bdb |
|
8 | import builtins | |
|
9 | 9 | import inspect |
|
10 | 10 | import os |
|
11 | 11 | import platform |
@@ -15,25 +15,25 b' import types' | |||
|
15 | 15 | import warnings |
|
16 | 16 | from contextlib import contextmanager |
|
17 | 17 | from pathlib import Path |
|
18 |
from typing import |
|
|
19 | from typing import Callable | |
|
20 | from typing import Dict | |
|
21 | from typing import Generator | |
|
22 | from typing import Iterable | |
|
23 | from typing import List | |
|
24 | from typing import Optional | |
|
25 | from typing import Pattern | |
|
26 | from typing import Sequence | |
|
27 | from typing import Tuple | |
|
28 | from typing import Type | |
|
29 | from typing import TYPE_CHECKING | |
|
30 | from typing import Union | |
|
18 | from typing import ( | |
|
19 | TYPE_CHECKING, | |
|
20 | Any, | |
|
21 | Callable, | |
|
22 | Dict, | |
|
23 | Generator, | |
|
24 | Iterable, | |
|
25 | List, | |
|
26 | Optional, | |
|
27 | Pattern, | |
|
28 | Sequence, | |
|
29 | Tuple, | |
|
30 | Type, | |
|
31 | Union, | |
|
32 | ) | |
|
31 | 33 | |
|
32 | 34 | import pytest |
|
33 | 35 | from _pytest import outcomes |
|
34 | from _pytest._code.code import ExceptionInfo | |
|
35 | from _pytest._code.code import ReprFileLocation | |
|
36 | from _pytest._code.code import TerminalRepr | |
|
36 | from _pytest._code.code import ExceptionInfo, ReprFileLocation, TerminalRepr | |
|
37 | 37 | from _pytest._io import TerminalWriter |
|
38 | 38 | from _pytest.compat import safe_getattr |
|
39 | 39 | from _pytest.config import Config |
@@ -41,14 +41,15 b' from _pytest.config.argparsing import Parser' | |||
|
41 | 41 | from _pytest.fixtures import FixtureRequest |
|
42 | 42 | from _pytest.nodes import Collector |
|
43 | 43 | from _pytest.outcomes import OutcomeException |
|
44 | from _pytest.pathlib import fnmatch_ex | |
|
45 | from _pytest.pathlib import import_path | |
|
44 | from _pytest.pathlib import fnmatch_ex, import_path | |
|
46 | 45 | from _pytest.python_api import approx |
|
47 | 46 | from _pytest.warning_types import PytestWarning |
|
48 | 47 | |
|
49 | 48 | if TYPE_CHECKING: |
|
50 | 49 | import doctest |
|
51 | 50 | |
|
51 | from .ipdoctest import IPDoctestOutputChecker | |
|
52 | ||
|
52 | 53 | DOCTEST_REPORT_CHOICE_NONE = "none" |
|
53 | 54 | DOCTEST_REPORT_CHOICE_CDIFF = "cdiff" |
|
54 | 55 | DOCTEST_REPORT_CHOICE_NDIFF = "ndiff" |
@@ -271,6 +272,8 b' def _get_runner(' | |||
|
271 | 272 | |
|
272 | 273 | |
|
273 | 274 | class IPDoctestItem(pytest.Item): |
|
275 | _user_ns_orig: Dict[str, Any] | |
|
276 | ||
|
274 | 277 | def __init__( |
|
275 | 278 | self, |
|
276 | 279 | name: str, |
@@ -283,6 +286,7 b' class IPDoctestItem(pytest.Item):' | |||
|
283 | 286 | self.dtest = dtest |
|
284 | 287 | self.obj = None |
|
285 | 288 | self.fixture_request: Optional[FixtureRequest] = None |
|
289 | self._user_ns_orig = {} | |
|
286 | 290 | |
|
287 | 291 | @classmethod |
|
288 | 292 | def from_parent( # type: ignore |
General Comments 0
You need to be logged in to leave comments.
Login now