This repository was archived by the owner on Feb 17, 2021. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -19,14 +19,17 @@ warn_unreachable = True
1919warn_unused_configs = True
2020warn_unused_ignores = True
2121
22- [mypy-tests .*]
23- disallow_untyped_decorators = False
22+ [mypy-_pytest .*]
23+ ignore_missing_imports = True
2424
2525[mypy-pytest]
2626ignore_missing_imports = True
2727
28- [mypy-_pytest.* ]
28+ [mypy-pytest_mock ]
2929ignore_missing_imports = True
3030
31+ [mypy-tests.*]
32+ disallow_untyped_decorators = False
33+
3134[mypy-tomlkit.*]
3235ignore_missing_imports = True
Load diff This file was deleted.
Load diff This file was deleted.
Original file line number Diff line number Diff line change 11"""Test cases for the __main__ module."""
2+ from typing import Any
23from unittest .mock import Mock
34
45import click .testing
@@ -15,21 +16,21 @@ def runner() -> click.testing.CliRunner:
1516
1617
1718@pytest .fixture
18- def mock_validation_validate_extension (mocker : MockFixture ) -> Mock :
19+ def mock_validation_validate_extension (mocker : MockFixture ) -> Any :
1920 """Fixture for mocking validation.validate_extension."""
2021 return mocker .patch ("toml_validator.validation.validate_extension" )
2122
2223
2324@pytest .fixture
24- def mock_validation_validate_toml_no_error (mocker : MockFixture ) -> Mock :
25+ def mock_validation_validate_toml_no_error (mocker : MockFixture ) -> Any :
2526 """Fixture for mocking validation.validate_toml with no errors."""
2627 mock = mocker .patch ("toml_validator.validation.validate_toml" )
2728 mock .return_value = ""
2829 return mock
2930
3031
3132@pytest .fixture
32- def mock_validation_validate_toml_with_error (mocker : MockFixture ) -> Mock :
33+ def mock_validation_validate_toml_with_error (mocker : MockFixture ) -> Any :
3334 """Fixture for mocking validation.validate_toml with error."""
3435 mock = mocker .patch ("toml_validator.validation.validate_toml" )
3536 mock .return_value = "|some error description|"
Original file line number Diff line number Diff line change 11"""Test cases for the validation module."""
2+ from typing import Any
23from unittest .mock import Mock
34
45import pytest
910
1011
1112@pytest .fixture
12- def mock_tomlkit_parse (mocker : MockFixture ) -> Mock :
13+ def mock_tomlkit_parse (mocker : MockFixture ) -> Any :
1314 """Fixture for mocking tomlkit.parse."""
1415 return mocker .patch ("tomlkit.parse" )
1516
1617
1718@pytest .fixture
18- def mock_tomlkit_parse_exception (mocker : MockFixture ) -> Mock :
19+ def mock_tomlkit_parse_exception (mocker : MockFixture ) -> Any :
1920 """Fixture for mocking tomlkit.parse."""
2021 mock = mocker .patch ("tomlkit.parse" )
2122 mock .side_effect = TOMLKitError ("|some tomlkit error|" )
2223 return mock
2324
2425
2526@pytest .fixture
26- def mock_open_valid_file (mocker : MockFixture ) -> Mock :
27+ def mock_open_valid_file (mocker : MockFixture ) -> Any :
2728 """Fixture for mocking build-in open for valid TOML file."""
2829 return mocker .patch ("builtins.open" , mocker .mock_open (read_data = "[x]\n a = 3" ))
2930
3031
3132@pytest .fixture
32- def mock_open_invalid_file (mocker : MockFixture ) -> Mock :
33+ def mock_open_invalid_file (mocker : MockFixture ) -> Any :
3334 """Fixture for mocking build-in open for valid TOML file."""
3435 return mocker .patch (
3536 "builtins.open" , mocker .mock_open (read_data = "[x]\n a = 3\n [x]\n a = 3" )
You can’t perform that action at this time.
0 commit comments