Commit Graph

11 Commits

Author SHA1 Message Date
William S Fulton d4ffa46f41 Convert python tests using 2to3
These tests were converted using 2to3 and should be valid using
Python 2.7 and Python 3+.
2020-08-15 00:16:04 +01:00
William S Fulton 365d4961d4 Remove print statements from Python tests
Use exceptions instead of printing to stdout.
Part of an effort to convert Python tests to python 3 syntax.
2020-08-13 21:22:47 +01:00
Jon Schlueter b77f3afafb autopep8 cleanup of Examples/test-suite/python
automated cleanup of python pep8 whitespace compliance
2015-05-08 21:35:52 -04:00
William S Fulton bbad7f96ab Bypass Python tests throwing base classes as exceptions for -builtin
Throwing builtin classes as exceptions is not supported
2014-10-07 20:58:30 +01:00
Stefan Zager 0cdf8658c7 Final merge from trunk
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12595 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-04-03 07:37:35 +00:00
Stefan Zager 5db5f109c7 python3 won't let you declare an 'except' clause for a non-throwable type, even if the clause is never executed.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12448 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-02-10 05:05:14 +00:00
Stefan Zager 002598680e This commit contains all changes to the regression tests which
are necessitated by the -builtin option.  Notes on individual tests
follow.

grouping_runme.py : 'cvar' syntax for class variables is obsolete.

li_std_string_extra_runme.py :
li_std_wstring_runme.py : Reverse binary operators (e.g., __radd__)
are not supported.

threads_exception_runme.py :
director_exception_runme.py :
exception_order_runme.py : Throwing wrapped objects as exceptions
is not supported.

default_constructor_runme.py : Redundant functional interface
(e.g., 'module.new_Foo()' for 'module.Foo()') is not provided.

python_nondynamic_runme.py : I believe that this test script doesn't
actually test the %pythonnondynamic feature correctly, and I believe
that the feature itself is implemented incorrectly.  With the -builtin
option, %pythonnondynamic *is* implemented correctly, and I have
modified the test script to exercise it correctly.



git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12416 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-01-30 04:13:58 +00:00
Marcelo Matus 06a949da6d add the %throws directive
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8348 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-10 10:12:32 +00:00
Marcelo Matus 54737ee9a9 - recover the proper catching exception mechanism for classes
(throw typemap).

- fix the examples with exception problems and warnings

- proper and consist treatment of basic types (short, unsigned char,...)

  now all are checked for range and sign. Before, this was depending of
  the use of parsing or no parsing, and/or the converter method, and/or
  the use of directors, etc.


git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5659 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-21 01:15:10 +00:00
Marcelo Matus 386d53ce62 fix precatching exception behaviour to postcatching
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@5617 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-01-12 23:40:58 +00:00
Marcelo Matus 20bf783966 Added test that checks the order between the global %except handler and local throw() definitions
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4766 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2003-05-02 21:19:36 +00:00