Skip to content

Commit

Permalink
Move from some _pytest imports to pytest imports
Browse files Browse the repository at this point in the history
These are now public interfaces.
I believe that using the public interfaces makes it less likely that
pytest minor bumps will break Sybil (e.g. with code moving between files).
  • Loading branch information
adamtheturtle committed Sep 19, 2024
1 parent d5dc627 commit 65e2ead
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 2 additions & 4 deletions sybil/integration/pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,11 @@
from typing import Callable, Union, Tuple, Optional, Sequence, List

import pytest
from pytest import Collector, ExceptionInfo, Module, Session
from _pytest import fixtures
from _pytest._code.code import TerminalRepr, Traceback, ExceptionInfo
from _pytest._code.code import TerminalRepr, Traceback
from _pytest._io import TerminalWriter
from _pytest.fixtures import FuncFixtureInfo
from _pytest.main import Session
from _pytest.nodes import Collector
from _pytest.python import Module

from sybil import example as example_module, Sybil, Document
from sybil.example import Example
Expand Down
4 changes: 1 addition & 3 deletions tests/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@
from typing import Optional, Tuple, List, Sequence, Union, Iterable
from unittest import TextTestRunner, main as unittest_main, SkipTest

from _pytest._code import ExceptionInfo
from _pytest.capture import CaptureFixture
from _pytest.config import main as pytest_main
from pytest import CaptureFixture, ExceptionInfo, main as pytest_main
from seedir import seedir
from testfixtures import compare

Expand Down

0 comments on commit 65e2ead

Please sign in to comment.