Skip to content

tests/basics: Add test for cexample module. #10037

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions tests/misc/cexample_module.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
# test custom builtin module

try:
import cexample
except ImportError:
print("SKIP")
raise SystemExit

print(cexample)

d = dir(cexample)
d.index("add_ints")

print(cexample.add_ints(1, 3))
2 changes: 2 additions & 0 deletions tests/misc/cexample_module.py.exp
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<module 'cexample'>
4
5 changes: 0 additions & 5 deletions tests/unix/extra_coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,6 @@
# function defined in C++ code
print("cpp", extra_cpp_coverage())

# test user C module
import cexample

print(cexample.add_ints(3, 2))

# test user C module mixed with C++ code
import cppexample

Expand Down
1 change: 0 additions & 1 deletion tests/unix/extra_coverage.py.exp
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,6 @@ OSError
None
None
cpp None
5
(3, 'hellocpp')
frzstr1
frzstr1.py
Expand Down