Skip to content

Some fixes. #219

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 6 commits into from
Jul 28, 2016
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
add test for #182
  • Loading branch information
matthid committed Jun 23, 2016
commit 8effe30d6cad5d5c0e55a1b5489ebeb59e441f9f
1 change: 1 addition & 0 deletions src/tests/runtests.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
# other test modules that import System.Windows.Forms
# run first. They must not do module level import/AddReference()
# of the System.Windows.Forms namespace.
'test_suite',
'test_event',
'test_constructors',
'test_enum',
Expand Down
10 changes: 10 additions & 0 deletions src/tests/test_suite/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
import unittest

__all__ = ['test_suite']

from .test_import import test_suite as import_tests

def test_suite():
suite = unittest.TestSuite()
suite.addTests((import_tests(),))
return suite
2 changes: 2 additions & 0 deletions src/tests/test_suite/_missing_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@

import this_package_should_never_exist_ever
16 changes: 16 additions & 0 deletions src/tests/test_suite/test_import.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import unittest

class ImportTests(unittest.TestCase):
"""Test the import statement."""

def testRealtiveMissingImport(self):
"""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"""
try:
from . import _missing_import
except ImportError:
pass


def test_suite():
return unittest.makeSuite(ImportTests)