Skip to content

Commit 1d27c7d

Browse files
laurensvalkdpgeorge
authored andcommitted
tests/misc: Add test for cexample module.
This also moves the existing test for cexample.add_ints originally done in extra_coverage. Signed-off-by: Laurens Valk <laurens@pybricks.com>
1 parent d75f49c commit 1d27c7d

File tree

4 files changed

+16
-6
lines changed

4 files changed

+16
-6
lines changed

tests/misc/cexample_module.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# test custom builtin module
2+
3+
try:
4+
import cexample
5+
except ImportError:
6+
print("SKIP")
7+
raise SystemExit
8+
9+
print(cexample)
10+
11+
d = dir(cexample)
12+
d.index("add_ints")
13+
14+
print(cexample.add_ints(1, 3))

tests/misc/cexample_module.py.exp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<module 'cexample'>
2+
4

tests/unix/extra_coverage.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,6 @@
4949
# function defined in C++ code
5050
print("cpp", extra_cpp_coverage())
5151

52-
# test user C module
53-
import cexample
54-
55-
print(cexample.add_ints(3, 2))
56-
5752
# test user C module mixed with C++ code
5853
import cppexample
5954

tests/unix/extra_coverage.py.exp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -179,7 +179,6 @@ OSError
179179
None
180180
None
181181
cpp None
182-
5
183182
(3, 'hellocpp')
184183
frzstr1
185184
frzstr1.py

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy