Skip to content

Commit

Permalink
tests/integration: switch from unittest.skip to pytest.mark.skip
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
fruch authored and actions-user committed Nov 19, 2024
1 parent 2bef230 commit ccb5e03
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/integration/standard/test_control_connection.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
from cassandra import InvalidRequest

import unittest

import pytest

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

# TODO: enable after https://github.com/scylladb/python-driver/issues/121 is fixed
@unittest.skip('Fails on scylla due to the broadcast_rpc_port is None')
@pytest.mark.skip('Fails on scylla due to the broadcast_rpc_port is None')
@notdse
@greaterthanorequalcass40
def test_control_connection_port_discovery(self):
Expand Down
2 changes: 1 addition & 1 deletion tests/integration/standard/test_metadata.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def setup_module():

class HostMetaDataTests(BasicExistingKeyspaceUnitTestCase):
# TODO: enable after https://github.com/scylladb/python-driver/issues/121 is fixed
@unittest.skip('Fails on scylla due to the broadcast_rpc_port is None')
@pytest.mark.skip('Fails on scylla due to the broadcast_rpc_port is None')
@local
def test_host_addresses(self):
"""
Expand Down
3 changes: 2 additions & 1 deletion tests/integration/standard/test_single_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
# limitations under the License.

import unittest
import pytest

from cassandra import ConsistencyLevel
from cassandra.query import SimpleStatement
Expand Down Expand Up @@ -45,7 +46,7 @@ def tearDown(self):
self.cluster.shutdown()

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

0 comments on commit ccb5e03

Please sign in to comment.