コード例 #1
0
 def test_register_options_provider_load_defaults(self) -> None:
     """Test that register_options_provider and load_defaults emits a DeprecationWarning."""
     checker = BaseChecker(self.linter)
     with pytest.warns(DeprecationWarning):
         self.linter.register_options_provider(checker)
     with pytest.warns(DeprecationWarning):
         self.linter.load_defaults()
コード例 #2
0
 def test_get_global_option(self) -> None:
     """Test that get_global_option emits a DeprecationWarning."""
     checker = BaseChecker(self.linter)
     with pytest.warns(DeprecationWarning):
         get_global_option(checker, "test-opt")  # type: ignore[call-overload]