Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aisk committed Apr 6, 2024
1 parent 1b624cd commit 31f7a45
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions tests/test_cytransport.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

import pytest

from thriftpy2._compat import PYPY
from thriftpy2._compat import CYTHON

pytestmark = pytest.mark.skipif(PYPY, reason="cython not enabled in pypy.")

if not PYPY:
if CYTHON:
from thriftpy2.transport.framed import TCyFramedTransport
from thriftpy2.transport.buffered import TCyBufferedTransport
from thriftpy2.transport import TMemoryBuffer, TTransportException
else:
pytest.skip("cython not enabled.", allow_module_level=True)


def test_transport_mismatch():
Expand Down
6 changes: 3 additions & 3 deletions tests/test_protocol_cybinary.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,16 +7,16 @@

import pytest

from thriftpy2._compat import PYPY
from thriftpy2._compat import CYTHON
from thriftpy2.thrift import TDecodeException, TPayload, TType
from thriftpy2.transport import TServerSocket, TSocket
from thriftpy2.utils import hexlify
if not PYPY:
if CYTHON:
from thriftpy2.protocol import cybin as proto
from thriftpy2.transport.buffered import TCyBufferedTransport
from thriftpy2.transport.memory import TCyMemoryBuffer
else:
pytest.skip("cython not enabled in pypy.", allow_module_level=True)
pytest.skip("cython not enabled.", allow_module_level=True)


class TItem(TPayload):
Expand Down

0 comments on commit 31f7a45

Please sign in to comment.