Skip to content

Commit dea4904

Browse files
authored
Merge pull request #395 from scylladb/dk/make-pytest-ignore-non-test-classes
Stop pytest from picking up non-test classes
2 parents 555c838 + 08e5980 commit dea4904

24 files changed

+54
-2
lines changed

tests/integration/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -1060,6 +1060,8 @@ def assert_startswith(s, prefix):
10601060

10611061

10621062
class TestCluster(object):
1063+
__test__ = False
1064+
10631065
DEFAULT_PROTOCOL_VERSION = default_protocol_version
10641066
DEFAULT_CASSANDRA_IP = CASSANDRA_IP
10651067
DEFAULT_ALLOW_BETA = ALLOW_BETA_PROTOCOL

tests/integration/cqlengine/advanced/test_cont_paging.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828

2929

3030
class TestMultiKeyModel(models.Model):
31+
__test__ = False
32+
3133
partition = columns.Integer(primary_key=True)
3234
cluster = columns.Integer(primary_key=True)
3335
count = columns.Integer(required=False)

tests/integration/cqlengine/base.py

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
from uuid import uuid4
2323

2424
class TestQueryUpdateModel(Model):
25+
__test__ = False
2526

2627
partition = columns.UUID(primary_key=True, default=uuid4)
2728
cluster = columns.Integer(primary_key=True)

tests/integration/cqlengine/columns/test_container_columns.py

+8
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,8 @@
3535

3636

3737
class TestSetModel(Model):
38+
__test__ = False
39+
3840
partition = columns.UUID(primary_key=True, default=uuid4)
3941
int_set = columns.Set(columns.Integer, required=False)
4042
text_set = columns.Set(columns.Text, required=False)
@@ -193,6 +195,7 @@ def test_default_empty_container_saving(self):
193195

194196

195197
class TestListModel(Model):
198+
__test__ = False
196199

197200
partition = columns.UUID(primary_key=True, default=uuid4)
198201
int_list = columns.List(columns.Integer, required=False)
@@ -347,6 +350,8 @@ def test_blind_list_updates_from_none(self):
347350

348351

349352
class TestMapModel(Model):
353+
__test__ = False
354+
350355
partition = columns.UUID(primary_key=True, default=uuid4)
351356
int_map = columns.Map(columns.Integer, columns.UUID, required=False)
352357
text_map = columns.Map(columns.Text, columns.DateTime, required=False)
@@ -525,6 +530,7 @@ def test_default_empty_container_saving(self):
525530

526531

527532
class TestCamelMapModel(Model):
533+
__test__ = False
528534

529535
partition = columns.UUID(primary_key=True, default=uuid4)
530536
camelMap = columns.Map(columns.Text, columns.Integer, required=False)
@@ -546,6 +552,7 @@ def test_camelcase_column(self):
546552

547553

548554
class TestTupleModel(Model):
555+
__test__ = False
549556

550557
partition = columns.UUID(primary_key=True, default=uuid4)
551558
int_tuple = columns.Tuple(columns.Integer, columns.Integer, columns.Integer, required=False)
@@ -746,6 +753,7 @@ def test_blind_tuple_updates_from_none(self):
746753

747754

748755
class TestNestedModel(Model):
756+
__test__ = False
749757

750758
partition = columns.UUID(primary_key=True, default=uuid4)
751759
list_list = columns.List(columns.List(columns.Integer), required=False)

tests/integration/cqlengine/columns/test_counter_column.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222

2323
class TestCounterModel(Model):
24+
__test__ = False
2425

2526
partition = columns.UUID(primary_key=True, default=uuid4)
2627
cluster = columns.UUID(primary_key=True, default=uuid4)

tests/integration/cqlengine/columns/test_static_column.py

+2
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
STATIC_SUPPORTED = PROTOCOL_VERSION >= 2
2929

3030
class TestStaticModel(Model):
31+
__test__ = False
32+
3133
partition = columns.UUID(primary_key=True, default=uuid4)
3234
cluster = columns.UUID(primary_key=True, default=uuid4)
3335
static = columns.Text(static=True)

tests/integration/cqlengine/connections/test_connection.py

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929

3030

3131
class TestConnectModel(Model):
32+
__test__ = False
3233

3334
id = columns.Integer(primary_key=True)
3435
keyspace = columns.Text()

tests/integration/cqlengine/management/test_management.py

+2
Original file line numberDiff line numberDiff line change
@@ -372,6 +372,8 @@ def test_sync_warnings(self):
372372

373373

374374
class TestIndexSetModel(Model):
375+
__test__ = False
376+
375377
partition = columns.UUID(primary_key=True)
376378
int_set = columns.Set(columns.Integer, index=True)
377379
int_list = columns.List(columns.Integer, index=True)

tests/integration/cqlengine/model/test_equality_operations.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
from cassandra.cqlengine import columns
2222

2323
class TestModel(Model):
24+
__test__ = False
2425

2526
id = columns.UUID(primary_key=True, default=lambda:uuid4())
2627
count = columns.Integer()

tests/integration/cqlengine/model/test_model_io.py

+5
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@
3636

3737

3838
class TestModel(Model):
39+
__test__ = False
3940

4041
id = columns.UUID(primary_key=True, default=lambda: uuid4())
4142
count = columns.Integer()
@@ -44,6 +45,8 @@ class TestModel(Model):
4445

4546

4647
class TestModelSave(Model):
48+
__test__ = False
49+
4750
partition = columns.UUID(primary_key=True, default=uuid4)
4851
cluster = columns.Integer(primary_key=True)
4952
count = columns.Integer(required=False)
@@ -302,6 +305,7 @@ class FloatingPointModel(Model):
302305

303306

304307
class TestMultiKeyModel(Model):
308+
__test__ = False
305309

306310
partition = columns.Integer(primary_key=True)
307311
cluster = columns.Integer(primary_key=True)
@@ -658,6 +662,7 @@ def test_reserved_cql_words_can_be_used_as_column_names(self):
658662

659663

660664
class TestQueryModel(Model):
665+
__test__ = False
661666

662667
test_id = columns.UUID(primary_key=True, default=uuid4)
663668
date = columns.Date(primary_key=True)

tests/integration/cqlengine/model/test_updates.py

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
from cassandra.cqlengine.usertype import UserType
2626

2727
class TestUpdateModel(Model):
28+
__test__ = False
2829

2930
partition = columns.UUID(primary_key=True, default=uuid4)
3031
cluster = columns.UUID(primary_key=True, default=uuid4)

tests/integration/cqlengine/model/test_value_lists.py

+2
Original file line numberDiff line numberDiff line change
@@ -22,11 +22,13 @@
2222

2323

2424
class TestModel(Model):
25+
__test__ = False
2526

2627
id = columns.Integer(primary_key=True)
2728
clustering_key = columns.Integer(primary_key=True, clustering_order='desc')
2829

2930
class TestClusteringComplexModel(Model):
31+
__test__ = False
3032

3133
id = columns.Integer(primary_key=True)
3234
clustering_key = columns.Integer(primary_key=True, clustering_order='desc')

tests/integration/cqlengine/query/test_batch_query.py

+1
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727

2828

2929
class TestMultiKeyModel(Model):
30+
__test__ = False
3031

3132
partition = columns.Integer(primary_key=True)
3233
cluster = columns.Integer(primary_key=True)

tests/integration/cqlengine/query/test_queryset.py

+3
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ def dst(self, dt):
6262

6363

6464
class TestModel(Model):
65+
__test__ = False
6566

6667
test_id = columns.Integer(primary_key=True)
6768
attempt_id = columns.Integer(primary_key=True)
@@ -104,6 +105,7 @@ class IndexedCollectionsTestModel(Model):
104105

105106

106107
class TestMultiClusteringModel(Model):
108+
__test__ = False
107109

108110
one = columns.Integer(primary_key=True)
109111
two = columns.Integer(primary_key=True)
@@ -1346,6 +1348,7 @@ def test_db_field_value_list(self):
13461348
list(DBFieldModel.objects.filter(c0=0, k0=0, k1=0).values_list('c0', 'v0'))
13471349

13481350
class TestModelSmall(Model):
1351+
__test__ = False
13491352

13501353
test_id = columns.Integer(primary_key=True)
13511354

tests/integration/cqlengine/test_batch_query.py

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@
2222
from mock import patch
2323

2424
class TestMultiKeyModel(Model):
25+
__test__ = False
26+
2527
partition = columns.Integer(primary_key=True)
2628
cluster = columns.Integer(primary_key=True)
2729
count = columns.Integer(required=False)

tests/integration/cqlengine/test_connections.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727

2828
class TestModel(Model):
29-
29+
__test__ = False
3030
__keyspace__ = 'ks1'
3131

3232
partition = columns.Integer(primary_key=True)

tests/integration/cqlengine/test_consistency.py

+1
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
from tests.integration.cqlengine.base import BaseCassEngTestCase
2727

2828
class TestConsistencyModel(Model):
29+
__test__ = False
2930

3031
id = columns.UUID(primary_key=True, default=lambda:uuid4())
3132
count = columns.Integer()

tests/integration/cqlengine/test_context_query.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020

2121

2222
class TestModel(Model):
23-
23+
__test__ = False
2424
__keyspace__ = 'ks1'
2525

2626
partition = columns.Integer(primary_key=True)

tests/integration/cqlengine/test_ifexists.py

+3
Original file line numberDiff line numberDiff line change
@@ -26,20 +26,23 @@
2626

2727

2828
class TestIfExistsModel(Model):
29+
__test__ = False
2930

3031
id = columns.UUID(primary_key=True, default=lambda: uuid4())
3132
count = columns.Integer()
3233
text = columns.Text(required=False)
3334

3435

3536
class TestIfExistsModel2(Model):
37+
__test__ = False
3638

3739
id = columns.Integer(primary_key=True)
3840
count = columns.Integer(primary_key=True, required=False)
3941
text = columns.Text(required=False)
4042

4143

4244
class TestIfExistsWithCounterModel(Model):
45+
__test__ = False
4346

4447
id = columns.UUID(primary_key=True, default=lambda: uuid4())
4548
likes = columns.Counter()

tests/integration/cqlengine/test_ifnotexists.py

+2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,15 @@
2525
from tests.integration import PROTOCOL_VERSION
2626

2727
class TestIfNotExistsModel(Model):
28+
__test__ = False
2829

2930
id = columns.UUID(primary_key=True, default=lambda:uuid4())
3031
count = columns.Integer()
3132
text = columns.Text(required=False)
3233

3334

3435
class TestIfNotExistsWithCounterModel(Model):
36+
__test__ = False
3537

3638
id = columns.UUID(primary_key=True, default=lambda:uuid4())
3739
likes = columns.Counter()

tests/integration/cqlengine/test_lwt_conditional.py

+4
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,16 @@
2727

2828

2929
class TestConditionalModel(Model):
30+
__test__ = False
31+
3032
id = columns.UUID(primary_key=True, default=uuid4)
3133
count = columns.Integer()
3234
text = columns.Text(required=False)
3335

3436

3537
class TestUpdateModel(Model):
38+
__test__ = False
39+
3640
partition = columns.Integer(primary_key=True)
3741
cluster = columns.Integer(primary_key=True)
3842
value = columns.Integer(required=False)

tests/integration/cqlengine/test_timestamp.py

+2
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525

2626

2727
class TestTimestampModel(Model):
28+
__test__ = False
29+
2830
id = columns.UUID(primary_key=True, default=lambda:uuid4())
2931
count = columns.Integer()
3032

tests/integration/cqlengine/test_ttl.py

+4
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,8 @@
2929

3030

3131
class TestTTLModel(Model):
32+
__test__ = False
33+
3234
id = columns.UUID(primary_key=True, default=lambda: uuid4())
3335
count = columns.Integer()
3436
text = columns.Text(required=False)
@@ -48,6 +50,8 @@ def tearDownClass(cls):
4850

4951

5052
class TestDefaultTTLModel(Model):
53+
__test__ = False
54+
5155
__options__ = {'default_time_to_live': 20}
5256
id = columns.UUID(primary_key=True, default=lambda:uuid4())
5357
count = columns.Integer()

tests/integration/standard/test_connection.py

+2
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ def test_in_flight_timeout(self):
9595

9696

9797
class TestHostListener(HostStateListener):
98+
__test__ = False
99+
98100
host_down = None
99101

100102
def on_down(self, host):

0 commit comments

Comments
 (0)