@@ -249,7 +249,8 @@ def bar(self, arg):
249
249
),
250
250
)
251
251
def test_instance_method_spy_exception (
252
- exc_cls : Type [BaseException ], mocker : MockerFixture ,
252
+ exc_cls : Type [BaseException ],
253
+ mocker : MockerFixture ,
253
254
) -> None :
254
255
class Foo :
255
256
def bar (self , arg ):
@@ -627,12 +628,12 @@ def test_foo(mocker):
627
628
628
629
629
630
def test_parse_ini_boolean () -> None :
630
- import pytest_mock
631
+ from pytest_mock . _util import parse_ini_boolean
631
632
632
- assert pytest_mock . parse_ini_boolean ("True" ) is True
633
- assert pytest_mock . parse_ini_boolean ("false" ) is False
633
+ assert parse_ini_boolean ("True" ) is True
634
+ assert parse_ini_boolean ("false" ) is False
634
635
with pytest .raises (ValueError ):
635
- pytest_mock . parse_ini_boolean ("foo" )
636
+ parse_ini_boolean ("foo" )
636
637
637
638
638
639
def test_patched_method_parameter_name (mocker : MockerFixture ) -> None :
@@ -651,8 +652,7 @@ def request(cls, method, args):
651
652
652
653
653
654
def test_monkeypatch_native (testdir : Any ) -> None :
654
- """Automatically disable monkeypatching when --tb=native.
655
- """
655
+ """Automatically disable monkeypatching when --tb=native."""
656
656
testdir .makepyfile (
657
657
"""
658
658
def test_foo(mocker):
@@ -676,8 +676,7 @@ def test_foo(mocker):
676
676
677
677
678
678
def test_monkeypatch_no_terminal (testdir : Any ) -> None :
679
- """Don't crash without 'terminal' plugin.
680
- """
679
+ """Don't crash without 'terminal' plugin."""
681
680
testdir .makepyfile (
682
681
"""
683
682
def test_foo(mocker):
@@ -692,8 +691,7 @@ def test_foo(mocker):
692
691
693
692
694
693
def test_standalone_mock (testdir : Any ) -> None :
695
- """Check that the "mock_use_standalone" is being used.
696
- """
694
+ """Check that the "mock_use_standalone" is being used."""
697
695
testdir .makepyfile (
698
696
"""
699
697
def test_foo(mocker):
@@ -713,8 +711,7 @@ def test_foo(mocker):
713
711
714
712
@pytest .mark .usefixtures ("needs_assert_rewrite" )
715
713
def test_detailed_introspection (testdir : Any ) -> None :
716
- """Check that the "mock_use_standalone" is being used.
717
- """
714
+ """Check that the "mock_use_standalone" is being used."""
718
715
testdir .makepyfile (
719
716
"""
720
717
def test(mocker):
@@ -755,8 +752,7 @@ def test(mocker):
755
752
)
756
753
@pytest .mark .usefixtures ("needs_assert_rewrite" )
757
754
def test_detailed_introspection_async (testdir : Any ) -> None :
758
- """Check that the "mock_use_standalone" is being used.
759
- """
755
+ """Check that the "mock_use_standalone" is being used."""
760
756
testdir .makepyfile (
761
757
"""
762
758
import pytest
0 commit comments