Skip to content

Commit ccb5e03

Browse files
fruchactions-user
authored andcommitted
tests/integration: switch from unittest.skip to pytest.mark.skip
when we use `unittest.skip` on a test function and run via pytest, we still collect the test and run the setup/teardown even the test function would be skipped. when running with cassandra we get into situations where create cluster is also failing for all kind of reasons, which we don't need that cluster.
1 parent 2bef230 commit ccb5e03

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

tests/integration/standard/test_control_connection.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from cassandra import InvalidRequest
1818

1919
import unittest
20-
20+
import pytest
2121

2222
from cassandra.protocol import ConfigurationException
2323
from tests.integration import use_singledc, PROTOCOL_VERSION, TestCluster, greaterthanorequalcass40, notdse
@@ -101,7 +101,7 @@ def test_get_control_connection_host(self):
101101
self.assertNotEqual(host, new_host)
102102

103103
# TODO: enable after https://github.com/scylladb/python-driver/issues/121 is fixed
104-
@unittest.skip('Fails on scylla due to the broadcast_rpc_port is None')
104+
@pytest.mark.skip('Fails on scylla due to the broadcast_rpc_port is None')
105105
@notdse
106106
@greaterthanorequalcass40
107107
def test_control_connection_port_discovery(self):

tests/integration/standard/test_metadata.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ def setup_module():
5555

5656
class HostMetaDataTests(BasicExistingKeyspaceUnitTestCase):
5757
# TODO: enable after https://github.com/scylladb/python-driver/issues/121 is fixed
58-
@unittest.skip('Fails on scylla due to the broadcast_rpc_port is None')
58+
@pytest.mark.skip('Fails on scylla due to the broadcast_rpc_port is None')
5959
@local
6060
def test_host_addresses(self):
6161
"""

tests/integration/standard/test_single_interface.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414

1515
import unittest
16+
import pytest
1617

1718
from cassandra import ConsistencyLevel
1819
from cassandra.query import SimpleStatement
@@ -45,7 +46,7 @@ def tearDown(self):
4546
self.cluster.shutdown()
4647

4748
# TODO: enable after https://github.com/scylladb/python-driver/issues/121 is fixed
48-
@unittest.skip('Fails on scylla due to the broadcast_rpc_port is None')
49+
@pytest.mark.skip('Fails on scylla due to the broadcast_rpc_port is None')
4950
def test_single_interface(self):
5051
"""
5152
Test that we can connect to a multiple hosts bound to a single interface.

0 commit comments

Comments
 (0)