Skip to content

Commit 0610f47

Browse files
authored
Merge pull request #599 from nose-devs/pre-commit-ci-update-config
[pre-commit.ci] pre-commit autoupdate
2 parents 9464a53 + f6d86d4 commit 0610f47

40 files changed

+22
-83
lines changed

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ repos:
1414
- id: check-dependabot
1515
- id: check-readthedocs
1616
- repo: https://github.com/psf/black
17-
rev: 23.12.1
17+
rev: 24.1.1
1818
hooks:
1919
- id: black
2020
language_version: python3

nose2/config.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33

44

55
class Config:
6-
76
"""Configuration for a plugin or other entities.
87
98
Encapsulates configuration for a single plugin or other element.

nose2/events.py

Lines changed: 0 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def __call__(cls, *args, **kwargs):
5151

5252

5353
class Plugin(metaclass=PluginMeta):
54-
5554
"""Base class for nose2 plugins
5655
5756
All nose2 plugins must subclass this class.
@@ -207,7 +206,6 @@ def __call__(self, parser, namespace, values, option_string=None):
207206

208207

209208
class Hook:
210-
211209
"""A plugin hook
212210
213211
Each plugin method in the :class:`nose2.events.PluginInterface` is
@@ -240,7 +238,6 @@ def append(self, plugin):
240238

241239

242240
class PluginInterface:
243-
244241
"""Definition of plugin interface.
245242
246243
Instances of this class contain the methods that may be called,
@@ -347,7 +344,6 @@ def __getattr__(self, attr):
347344

348345

349346
class Event:
350-
351347
"""Base class for all events.
352348
353349
.. attribute :: metadata
@@ -405,7 +401,6 @@ def __getstate__(self):
405401

406402

407403
class PluginsLoadedEvent(Event):
408-
409404
"""Event fired after all plugin classes are loaded.
410405
411406
.. attribute :: pluginsLoaded
@@ -422,7 +417,6 @@ def __init__(self, pluginsLoaded, **kw):
422417

423418

424419
class RunnerCreatedEvent(Event):
425-
426420
"""Event fired when test runner is created.
427421
428422
.. attribute :: runner
@@ -440,7 +434,6 @@ def __init__(self, runner, **kw):
440434

441435

442436
class ResultCreatedEvent(Event):
443-
444437
"""Event fired when test result handler is created.
445438
446439
.. attribute :: result
@@ -458,7 +451,6 @@ def __init__(self, result, **kw):
458451

459452

460453
class StartLayerSetupEvent(Event):
461-
462454
"""Event fired before running a layer setup.
463455
464456
.. attribute :: layer
@@ -474,7 +466,6 @@ def __init__(self, layer, **kw):
474466

475467

476468
class StopLayerSetupEvent(Event):
477-
478469
"""Event fired after running a layer setup.
479470
480471
.. attribute :: layer
@@ -490,7 +481,6 @@ def __init__(self, layer, **kw):
490481

491482

492483
class StartLayerSetupTestEvent(Event):
493-
494484
"""Event fired before test cases setups in layers.
495485
496486
.. attribute :: layer
@@ -511,7 +501,6 @@ def __init__(self, layer, test, **kw):
511501

512502

513503
class StopLayerSetupTestEvent(Event):
514-
515504
"""Event fired after test cases setups in layers.
516505
517506
.. attribute :: layer
@@ -532,7 +521,6 @@ def __init__(self, layer, test, **kw):
532521

533522

534523
class StartLayerTeardownEvent(Event):
535-
536524
"""Event fired before running a layer teardown.
537525
538526
.. attribute :: layer
@@ -548,7 +536,6 @@ def __init__(self, layer, **kw):
548536

549537

550538
class StopLayerTeardownEvent(Event):
551-
552539
"""Event fired after running a layer teardown.
553540
554541
.. attribute :: layer
@@ -564,7 +551,6 @@ def __init__(self, layer, **kw):
564551

565552

566553
class StartLayerTeardownTestEvent(Event):
567-
568554
"""Event fired before test cases teardowns in layers.
569555
570556
.. attribute :: layer
@@ -585,7 +571,6 @@ def __init__(self, layer, test, **kw):
585571

586572

587573
class StopLayerTeardownTestEvent(Event):
588-
589574
"""Event fired after test cases teardowns in layers.
590575
591576
.. attribute :: layer
@@ -606,7 +591,6 @@ def __init__(self, layer, test, **kw):
606591

607592

608593
class StartTestRunEvent(Event):
609-
610594
"""Event fired when test run is about to start.
611595
612596
Test collection is complete before this event fires, but
@@ -657,7 +641,6 @@ def __init__(self, runner, suite, result, startTime, executeTests, **kw):
657641

658642

659643
class StopTestRunEvent(Event):
660-
661644
"""Event fired when test run has stopped.
662645
663646
.. attribute :: runner
@@ -689,7 +672,6 @@ def __init__(self, runner, result, stopTime, timeTaken, **kw):
689672

690673

691674
class StartTestEvent(Event):
692-
693675
"""Event fired before a test is executed.
694676
695677
.. attribute :: test
@@ -716,7 +698,6 @@ def __init__(self, test, result, startTime, **kw):
716698

717699

718700
class StopTestEvent(Event):
719-
720701
"""Event fired after a test is executed.
721702
722703
.. attribute :: test
@@ -743,7 +724,6 @@ def __init__(self, test, result, stopTime, **kw):
743724

744725

745726
class TestOutcomeEvent(Event):
746-
747727
"""Event fired when a test completes.
748728
749729
.. attribute :: test
@@ -830,7 +810,6 @@ def __init__(
830810

831811

832812
class LoadFromModuleEvent(Event):
833-
834813
"""Event fired when a test module is loaded.
835814
836815
.. attribute :: loader
@@ -874,7 +853,6 @@ def __init__(self, loader, module, suite, **kw):
874853

875854

876855
class LoadFromTestCaseEvent(Event):
877-
878856
"""Event fired when tests are loaded from a test case.
879857
880858
.. attribute :: loader
@@ -908,7 +886,6 @@ def __init__(self, loader, testCase, **kw):
908886

909887

910888
class LoadFromNamesEvent(Event):
911-
912889
"""Event fired to load tests from test names.
913890
914891
.. attribute :: loader
@@ -951,7 +928,6 @@ def __str__(self):
951928

952929

953930
class LoadFromNameEvent(Event):
954-
955931
"""Event fired to load tests from test names.
956932
957933
.. attribute :: loader
@@ -991,7 +967,6 @@ def __init__(self, loader, name, module, **kw):
991967

992968

993969
class HandleFileEvent(Event):
994-
995970
"""Event fired when a non-test file is examined.
996971
997972
.. note ::
@@ -1047,7 +1022,6 @@ def __init__(self, loader, name, path, pattern, topLevelDirectory, **kw):
10471022

10481023

10491024
class MatchPathEvent(Event):
1050-
10511025
"""Event fired during file matching.
10521026
10531027
Plugins may return ``False`` and set ``handled`` on this event to prevent
@@ -1078,7 +1052,6 @@ def __init__(self, name, path, pattern, **kw):
10781052

10791053

10801054
class GetTestCaseNamesEvent(Event):
1081-
10821055
"""Event fired to find test case names in a test case.
10831056
10841057
Plugins may return a list of names and set ``handled`` on this
@@ -1137,7 +1110,6 @@ def __init__(self, loader, testCase, isTestMethod, **kw):
11371110

11381111

11391112
class ResultSuccessEvent(Event):
1140-
11411113
"""Event fired at end of test run to determine success.
11421114
11431115
This event fires at the end of the test run and allows
@@ -1167,7 +1139,6 @@ def __init__(self, result, success, **kw):
11671139

11681140

11691141
class ResultStopEvent(Event):
1170-
11711142
"""Event fired when a test run is told to stop.
11721143
11731144
Plugins can use this event to prevent other plugins from stopping
@@ -1192,7 +1163,6 @@ def __init__(self, result, shouldStop, **kw):
11921163

11931164

11941165
class DescribeTestEvent(Event):
1195-
11961166
"""Event fired to get test description.
11971167
11981168
@@ -1221,7 +1191,6 @@ def __init__(self, test, description=None, errorList=False, **kw):
12211191

12221192

12231193
class OutcomeDetailEvent(Event):
1224-
12251194
"""Event fired to acquire additional details about test outcome.
12261195
12271196
.. attribute :: outcomeEvent
@@ -1246,7 +1215,6 @@ def __init__(self, outcomeEvent, **kw):
12461215

12471216

12481217
class ReportSummaryEvent(Event):
1249-
12501218
"""Event fired before and after summary report.
12511219
12521220
.. attribute :: stopTestEvent
@@ -1277,7 +1245,6 @@ def __init__(self, stopTestEvent, stream, reportCategories, **kw):
12771245

12781246

12791247
class ReportTestEvent(Event):
1280-
12811248
"""Event fired to report a test event.
12821249
12831250
Plugins can respond to this event by producing output for the user.
@@ -1304,7 +1271,6 @@ def __init__(self, testEvent, stream, **kw):
13041271

13051272

13061273
class UserInteractionEvent(Event):
1307-
13081274
"""Event fired before and after user interaction.
13091275
13101276
Plugins that capture stdout or otherwise prevent user interaction
@@ -1321,7 +1287,6 @@ def __init__(self, **kw):
13211287

13221288

13231289
class CommandLineArgsEvent(Event):
1324-
13251290
"""Event fired after parsing of command line arguments.
13261291
13271292
Plugins can respond to this event by configuring themselves or other plugins
@@ -1347,7 +1312,6 @@ def __init__(self, args, **kw):
13471312

13481313

13491314
class CreateTestsEvent(Event):
1350-
13511315
"""Event fired before test loading.
13521316
13531317
Plugins can take over test loading by returning a test suite and setting

nose2/exceptions.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,8 @@
66

77

88
class TestNotFoundError(Exception):
9-
109
"""Raised when a named test cannot be found"""
1110

1211

1312
class LoadTestsFailure(Exception):
14-
1513
"""Raised when a test cannot be loaded"""

nose2/loader.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515

1616

1717
class PluggableTestLoader:
18-
1918
"""Test loader that defers all loading to plugins
2019
2120
:param session: Test run session.

nose2/main.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111

1212
class PluggableTestProgram(unittest.TestProgram):
13-
1413
"""TestProgram that enables plugins.
1514
1615
Accepts the same parameters as :class:`unittest.TestProgram`,

nose2/plugins/attrib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@
88

99

1010
class AttributeSelector(Plugin):
11-
1211
"""Filter tests by attribute"""
1312

1413
def __init__(self):

nose2/plugins/buffer.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,6 @@ def __repr__(self):
5151

5252

5353
class OutputBufferPlugin(events.Plugin):
54-
5554
"""Buffer output during test execution"""
5655

5756
commandLineSwitch = ("B", "output-buffer", "Enable output buffer")

nose2/plugins/collect.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
them. To do so it calls result.startTest, result.addSuccess and
55
result.stopTest for each test, without calling the test itself.
66
"""
7+
78
import unittest
89

910
from nose2.events import Plugin
@@ -12,7 +13,6 @@
1213

1314

1415
class CollectOnly(Plugin):
15-
1616
"""Collect but don't run tests"""
1717

1818
configSection = "collect-only"

nose2/plugins/debugger.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
prevent this plugin from launching pdb.
1111
1212
"""
13+
1314
import logging
1415
import pdb
1516

@@ -20,7 +21,6 @@
2021

2122

2223
class Debugger(events.Plugin):
23-
2424
"""Enter pdb on test error or failure
2525
2626
.. attribute :: pdb

0 commit comments

Comments
 (0)