Skip to content

Commit e41da91

Browse files
authored
Add pyspamsum to the acceptance test (#114)
1 parent 97e501c commit e41da91

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

pyproject.toml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,14 @@ requires = [
3434
(platform_system != 'iOS' and platform_system != 'Android' and python_version < '3.14') \
3535
or (platform_system == 'iOS' and python_version < '3.14') \
3636
or (platform_system == 'Android' and python_version < '3.14')""",
37+
# pyspamum has 3.13 wheels on iOS and Android; and no wheels on Windows
38+
# On Linux, we need to restrict the test to Python3.13+, because Android reports
39+
# as "Linux" on Python3.12 and earlier.
40+
"""pyspamsum; \
41+
(platform_system == 'Darwin' and python_version < '3.14') \
42+
or (platform_system == 'iOS' and python_version == '3.13') \
43+
or (platform_system == 'Android' and python_version == '3.13') \
44+
or (platform_system == 'Linux' and python_version == '3.13')""",
3745
# Numpy not available on iOS for 3.13+, or all on 3.14.
3846
"""numpy; \
3947
(platform_system != 'iOS' and platform_system != 'Android' and python_version < '3.14') \

tests/test_thirdparty.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,22 @@ def test_cryptography():
117117
assert "www.android.com" == domain
118118

119119

120+
@xfail_if_not_installed("pyspamsum")
121+
def test_pyspamsum():
122+
"The PySpamSum binary module can be used"
123+
# spamsum is a binary module, with iOS/Android binary wheels published on
124+
# PyPI.
125+
import spamsum
126+
127+
assert (
128+
spamsum.spamsum(
129+
"I am the very model of a modern Major-General, "
130+
"I've information animal and vegetable and mineral"
131+
)
132+
== "3:kEvyc/sFIKwYclQY4MKLFE4Igu0uLzIKygn:kE6Ai3KQ/MKOgDKZn"
133+
)
134+
135+
120136
@xfail_if_not_installed("lru-dict")
121137
def test_lru_dict():
122138
"The LRUDict binary module can be used"

0 commit comments

Comments
 (0)