Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
This repository was archived by the owner on Jul 22, 2023. It is now read-only.
/pythonnetPublic archive
forked frompythonnet/pythonnet

Commit8effe30

Browse files
committed
add test forpythonnet#182
1 parent87e1df3 commit8effe30

File tree

4 files changed

+29
-0
lines changed

4 files changed

+29
-0
lines changed

‎src/tests/runtests.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# other test modules that import System.Windows.Forms
1919
# run first. They must not do module level import/AddReference()
2020
# of the System.Windows.Forms namespace.
21+
'test_suite',
2122
'test_event',
2223
'test_constructors',
2324
'test_enum',

‎src/tests/test_suite/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
importunittest
2+
3+
__all__= ['test_suite']
4+
5+
from .test_importimporttest_suiteasimport_tests
6+
7+
deftest_suite():
8+
suite=unittest.TestSuite()
9+
suite.addTests((import_tests(),))
10+
returnsuite
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
importthis_package_should_never_exist_ever

‎src/tests/test_suite/test_import.py

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
importunittest
2+
3+
classImportTests(unittest.TestCase):
4+
"""Test the import statement."""
5+
6+
deftestRealtiveMissingImport(self):
7+
"""Test that a relative missing import doesn't crash. Some modules use this to check if a package is installed (realtive import in the site-packages folder"""
8+
try:
9+
from .import_missing_import
10+
exceptImportError:
11+
pass
12+
13+
14+
deftest_suite():
15+
returnunittest.makeSuite(ImportTests)
16+

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp