Commit Graph

13 Commits

Author SHA1 Message Date
William S Fulton 9169555628 Remove further 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:47:20 +01:00
William S Fulton 64d3617b3c Improve Python testing catching exceptions
Catch expected exceptions only
2020-08-13 21:40:11 +01:00
William S Fulton 3718b810c7 Don't generate constructor wrappers if a base class has a private constructor
g++-5 errors out with this now with errors such as:

default_constructor_wrap.cxx:665:27: error: use of deleted function ‘FFF::FFF()’
   result = (FFF *)new FFF();
                           ^
default_constructor_wrap.cxx:314:7: note: ‘FFF::FFF()’ is implicitly deleted because the default definition would be ill-formed:
 class FFF : public F {
       ^
default_constructor_wrap.cxx:301:4: error: ‘F::~F()’ is private
    ~F() { }
    ^
default_constructor_wrap.cxx:314:7: error: within this context
2015-07-07 20:15:55 +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 afcd61388a Bypass Python tests not supported by -builtin
The old static syntax (e.g., dc.new_A() rather than dc.A()) is not
supported with -builtin
2014-10-07 20:58:39 +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 3d444101d1 A slew of changes based on William Fulton's code review.
- Fixed naming conventions; SwigPyBuiltin is used a lot
- Removed use of std::vector
- builtin.swg isn't included if -builtin isn't specified
- Changed many feature names to use a "python:" prefix
- Eliminated static vars in std_pair.i
- Eliminated C++-style comments (//)
- Enabled autodoc and docstring with -builtin
- Fixed non-ansi generated C code
- Detect and complain if two incompatible swig modules are loaded
- Removed argcargvtest_runme3.py, and fixed argcargvtest_runme.py
  so that 2to3 handles it better
- Removed anonymous namespaces
- Eliminated builtin_init typemaps; consolidated functionality into
  SWIG_Python_NewPointerObj
- Eliminate printf warnings from %U conversion character by switching
  to %S, which works just as well
- Fixed li_std_set_runme.py for python3, which returns set members in
  a different order from python2





git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12562 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2011-03-29 06:57:02 +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 dde6392a0c fix memory leaks in test
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8597 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-28 19:18:47 +00:00
Marcelo Matus 3b137ec4d3 update for -copyctor option
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8192 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2006-01-02 17:48:05 +00:00
Marcelo Matus 78266c9b0d change stream test name, plus more tests
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6791 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-28 22:34:48 +00:00
Marcelo Matus c4d6cdf0ab fix non public overload order
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@6770 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2004-11-28 09:15:58 +00:00
Dave Beazley 12a43edc2d The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
2002-11-30 22:01:28 +00:00