Skip to content

Commit 5b1f005

Browse files
committed
Mark non-test classes with __test__ = False attribute
This resolves few warnings that were emitted by pytest.
1 parent 1aa5b20 commit 5b1f005

File tree

3 files changed

+10
-0
lines changed

3 files changed

+10
-0
lines changed

tests/searchcommands/test_decorators.py

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

3333
@Configuration()
3434
class TestSearchCommand(SearchCommand):
35+
__test__ = False
36+
3537
boolean = Option(
3638
doc="""
3739
**Syntax:** **boolean=***<value>*

tests/searchcommands/test_internals_v2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,8 @@ def _load_chunks(self, ifile):
300300

301301

302302
class TestRecorder:
303+
__test__ = False
304+
303305
def __init__(self, test_case):
304306
self._test_case = test_case
305307
self._output = None
@@ -389,6 +391,8 @@ def _record(*args, **kwargs):
389391

390392

391393
class Test:
394+
__test__ = False
395+
392396
def __init__(self, fieldnames, data_generators):
393397
TestCase.__init__(self)
394398
self._data_generators = list(

tests/searchcommands/test_search_command.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ def build_command_input(getinfo_metadata, execute_metadata, execute_body):
5555

5656
@Configuration()
5757
class TestCommand(SearchCommand):
58+
__test__ = False
59+
5860
required_option_1 = Option(require=True)
5961
required_option_2 = Option(require=True)
6062

@@ -99,6 +101,8 @@ class ConfigurationSettings(SearchCommand.ConfigurationSettings):
99101

100102
@Configuration()
101103
class TestStreamingCommand(StreamingCommand):
104+
__test__ = False
105+
102106
def stream(self, records):
103107
serial_number = 0
104108
for record in records:

0 commit comments

Comments
 (0)