Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pre-commit.ci] pre-commit autoupdate #599

Merged
merged 2 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ repos:
- id: check-dependabot
- id: check-readthedocs
- repo: https://github.com/psf/black
rev: 23.12.1
rev: 24.1.1
hooks:
- id: black
language_version: python3
Expand Down
1 change: 0 additions & 1 deletion nose2/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@


class Config:

"""Configuration for a plugin or other entities.

Encapsulates configuration for a single plugin or other element.
Expand Down
36 changes: 0 additions & 36 deletions nose2/events.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __call__(cls, *args, **kwargs):


class Plugin(metaclass=PluginMeta):

"""Base class for nose2 plugins

All nose2 plugins must subclass this class.
Expand Down Expand Up @@ -207,7 +206,6 @@ def __call__(self, parser, namespace, values, option_string=None):


class Hook:

"""A plugin hook

Each plugin method in the :class:`nose2.events.PluginInterface` is
Expand Down Expand Up @@ -240,7 +238,6 @@ def append(self, plugin):


class PluginInterface:

"""Definition of plugin interface.

Instances of this class contain the methods that may be called,
Expand Down Expand Up @@ -347,7 +344,6 @@ def __getattr__(self, attr):


class Event:

"""Base class for all events.

.. attribute :: metadata
Expand Down Expand Up @@ -405,7 +401,6 @@ def __getstate__(self):


class PluginsLoadedEvent(Event):

"""Event fired after all plugin classes are loaded.

.. attribute :: pluginsLoaded
Expand All @@ -422,7 +417,6 @@ def __init__(self, pluginsLoaded, **kw):


class RunnerCreatedEvent(Event):

"""Event fired when test runner is created.

.. attribute :: runner
Expand All @@ -440,7 +434,6 @@ def __init__(self, runner, **kw):


class ResultCreatedEvent(Event):

"""Event fired when test result handler is created.

.. attribute :: result
Expand All @@ -458,7 +451,6 @@ def __init__(self, result, **kw):


class StartLayerSetupEvent(Event):

"""Event fired before running a layer setup.

.. attribute :: layer
Expand All @@ -474,7 +466,6 @@ def __init__(self, layer, **kw):


class StopLayerSetupEvent(Event):

"""Event fired after running a layer setup.

.. attribute :: layer
Expand All @@ -490,7 +481,6 @@ def __init__(self, layer, **kw):


class StartLayerSetupTestEvent(Event):

"""Event fired before test cases setups in layers.

.. attribute :: layer
Expand All @@ -511,7 +501,6 @@ def __init__(self, layer, test, **kw):


class StopLayerSetupTestEvent(Event):

"""Event fired after test cases setups in layers.

.. attribute :: layer
Expand All @@ -532,7 +521,6 @@ def __init__(self, layer, test, **kw):


class StartLayerTeardownEvent(Event):

"""Event fired before running a layer teardown.

.. attribute :: layer
Expand All @@ -548,7 +536,6 @@ def __init__(self, layer, **kw):


class StopLayerTeardownEvent(Event):

"""Event fired after running a layer teardown.

.. attribute :: layer
Expand All @@ -564,7 +551,6 @@ def __init__(self, layer, **kw):


class StartLayerTeardownTestEvent(Event):

"""Event fired before test cases teardowns in layers.

.. attribute :: layer
Expand All @@ -585,7 +571,6 @@ def __init__(self, layer, test, **kw):


class StopLayerTeardownTestEvent(Event):

"""Event fired after test cases teardowns in layers.

.. attribute :: layer
Expand All @@ -606,7 +591,6 @@ def __init__(self, layer, test, **kw):


class StartTestRunEvent(Event):

"""Event fired when test run is about to start.

Test collection is complete before this event fires, but
Expand Down Expand Up @@ -657,7 +641,6 @@ def __init__(self, runner, suite, result, startTime, executeTests, **kw):


class StopTestRunEvent(Event):

"""Event fired when test run has stopped.

.. attribute :: runner
Expand Down Expand Up @@ -689,7 +672,6 @@ def __init__(self, runner, result, stopTime, timeTaken, **kw):


class StartTestEvent(Event):

"""Event fired before a test is executed.

.. attribute :: test
Expand All @@ -716,7 +698,6 @@ def __init__(self, test, result, startTime, **kw):


class StopTestEvent(Event):

"""Event fired after a test is executed.

.. attribute :: test
Expand All @@ -743,7 +724,6 @@ def __init__(self, test, result, stopTime, **kw):


class TestOutcomeEvent(Event):

"""Event fired when a test completes.

.. attribute :: test
Expand Down Expand Up @@ -830,7 +810,6 @@ def __init__(


class LoadFromModuleEvent(Event):

"""Event fired when a test module is loaded.

.. attribute :: loader
Expand Down Expand Up @@ -874,7 +853,6 @@ def __init__(self, loader, module, suite, **kw):


class LoadFromTestCaseEvent(Event):

"""Event fired when tests are loaded from a test case.

.. attribute :: loader
Expand Down Expand Up @@ -908,7 +886,6 @@ def __init__(self, loader, testCase, **kw):


class LoadFromNamesEvent(Event):

"""Event fired to load tests from test names.

.. attribute :: loader
Expand Down Expand Up @@ -951,7 +928,6 @@ def __str__(self):


class LoadFromNameEvent(Event):

"""Event fired to load tests from test names.

.. attribute :: loader
Expand Down Expand Up @@ -991,7 +967,6 @@ def __init__(self, loader, name, module, **kw):


class HandleFileEvent(Event):

"""Event fired when a non-test file is examined.

.. note ::
Expand Down Expand Up @@ -1047,7 +1022,6 @@ def __init__(self, loader, name, path, pattern, topLevelDirectory, **kw):


class MatchPathEvent(Event):

"""Event fired during file matching.

Plugins may return ``False`` and set ``handled`` on this event to prevent
Expand Down Expand Up @@ -1078,7 +1052,6 @@ def __init__(self, name, path, pattern, **kw):


class GetTestCaseNamesEvent(Event):

"""Event fired to find test case names in a test case.

Plugins may return a list of names and set ``handled`` on this
Expand Down Expand Up @@ -1137,7 +1110,6 @@ def __init__(self, loader, testCase, isTestMethod, **kw):


class ResultSuccessEvent(Event):

"""Event fired at end of test run to determine success.

This event fires at the end of the test run and allows
Expand Down Expand Up @@ -1167,7 +1139,6 @@ def __init__(self, result, success, **kw):


class ResultStopEvent(Event):

"""Event fired when a test run is told to stop.

Plugins can use this event to prevent other plugins from stopping
Expand All @@ -1192,7 +1163,6 @@ def __init__(self, result, shouldStop, **kw):


class DescribeTestEvent(Event):

"""Event fired to get test description.


Expand Down Expand Up @@ -1221,7 +1191,6 @@ def __init__(self, test, description=None, errorList=False, **kw):


class OutcomeDetailEvent(Event):

"""Event fired to acquire additional details about test outcome.

.. attribute :: outcomeEvent
Expand All @@ -1246,7 +1215,6 @@ def __init__(self, outcomeEvent, **kw):


class ReportSummaryEvent(Event):

"""Event fired before and after summary report.

.. attribute :: stopTestEvent
Expand Down Expand Up @@ -1277,7 +1245,6 @@ def __init__(self, stopTestEvent, stream, reportCategories, **kw):


class ReportTestEvent(Event):

"""Event fired to report a test event.

Plugins can respond to this event by producing output for the user.
Expand All @@ -1304,7 +1271,6 @@ def __init__(self, testEvent, stream, **kw):


class UserInteractionEvent(Event):

"""Event fired before and after user interaction.

Plugins that capture stdout or otherwise prevent user interaction
Expand All @@ -1321,7 +1287,6 @@ def __init__(self, **kw):


class CommandLineArgsEvent(Event):

"""Event fired after parsing of command line arguments.

Plugins can respond to this event by configuring themselves or other plugins
Expand All @@ -1347,7 +1312,6 @@ def __init__(self, args, **kw):


class CreateTestsEvent(Event):

"""Event fired before test loading.

Plugins can take over test loading by returning a test suite and setting
Expand Down
2 changes: 0 additions & 2 deletions nose2/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,8 @@


class TestNotFoundError(Exception):

"""Raised when a named test cannot be found"""


class LoadTestsFailure(Exception):

"""Raised when a test cannot be loaded"""
1 change: 0 additions & 1 deletion nose2/loader.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@


class PluggableTestLoader:

"""Test loader that defers all loading to plugins

:param session: Test run session.
Expand Down
1 change: 0 additions & 1 deletion nose2/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@


class PluggableTestProgram(unittest.TestProgram):

"""TestProgram that enables plugins.

Accepts the same parameters as :class:`unittest.TestProgram`,
Expand Down
1 change: 0 additions & 1 deletion nose2/plugins/attrib.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@


class AttributeSelector(Plugin):

"""Filter tests by attribute"""

def __init__(self):
Expand Down
1 change: 0 additions & 1 deletion nose2/plugins/buffer.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@ def __repr__(self):


class OutputBufferPlugin(events.Plugin):

"""Buffer output during test execution"""

commandLineSwitch = ("B", "output-buffer", "Enable output buffer")
Expand Down
2 changes: 1 addition & 1 deletion nose2/plugins/collect.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
them. To do so it calls result.startTest, result.addSuccess and
result.stopTest for each test, without calling the test itself.
"""

import unittest

from nose2.events import Plugin
Expand All @@ -12,7 +13,6 @@


class CollectOnly(Plugin):

"""Collect but don't run tests"""

configSection = "collect-only"
Expand Down
2 changes: 1 addition & 1 deletion nose2/plugins/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
prevent this plugin from launching pdb.

"""

import logging
import pdb

Expand All @@ -20,7 +21,6 @@


class Debugger(events.Plugin):

"""Enter pdb on test error or failure

.. attribute :: pdb
Expand Down
1 change: 1 addition & 0 deletions nose2/plugins/doctests.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
extensions =

"""

import doctest
import os

Expand Down
1 change: 1 addition & 0 deletions nose2/plugins/dundertest.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
This plugin implements :func:`startTestRun`, which excludes all test objects
that define a ``__test__`` attribute that evaluates to ``False``.
"""

from unittest import TestSuite

from nose2 import events
Expand Down
Loading