Skip to content

Commit

Permalink
Merge pull request #1771 from minrk/test-cython
Browse files Browse the repository at this point in the history
include test cython files in package_data
  • Loading branch information
minrk authored Sep 20, 2022
2 parents 0c9ba1d + 5353026 commit d008ba9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -1299,6 +1299,7 @@ def finalize_options(self):
'zmq.backend.cffi': ['*.h', '*.c'],
'zmq.devices': ['*.pxd'],
'zmq.sugar': ['*.pyi'],
'zmq.tests': ['*.pyx'],
'zmq.utils': ['*.pxd', '*.h', '*.json'],
}

Expand Down
8 changes: 8 additions & 0 deletions zmq/tests/test_cython.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,18 @@
import os
import sys

import pytest

import zmq

HERE = os.path.dirname(__file__)
cython_ext = os.path.join(HERE, "cython_ext.pyx")


@pytest.mark.skipif(
not os.path.exists(cython_ext),
reason=f"Requires cython test file {cython_ext}",
)
@pytest.mark.skipif(
'zmq.backend.cython' not in sys.modules, reason="Requires cython backend"
)
Expand Down

0 comments on commit d008ba9

Please sign in to comment.