Commit Graph

11 Commits

Author SHA1 Message Date
William S Fulton b1c0145fd3 Python 3.2 syntax error fixes in tests 2020-08-15 23:51:40 +01:00
William S Fulton 66df0bd224 Convert python test scripts to be Python 2 and 3 compatible
Unicode testing
2020-08-15 00:09:31 +01:00
Dmitry D. Chernov fa5f519bf9 Test-suite: Unify string quoting in the Python sources 2019-07-14 12:58:21 +10:00
William S Fulton b0e29fbdf3 Add missing checks for failures in calls to PyUnicode_AsUTF8String.
Previously a seg fault could occur when passing invalid UTF8 strings (low
surrogates), eg passing u"\udcff" to the C layer (Python 3).
2017-12-04 20:14:04 +00:00
William S Fulton cc7319f52f Replace assert from Python testcases with code that always runs.
assert code is sometimes not executed, eg when running python -O.
2016-06-19 20:11:51 +01:00
William S Fulton 01611702ec Python 2 Unicode strings can be used as inputs to char * or std::string types
Requires SWIG_PYTHON_2_UNICODE to be defined when compiling generated code.
2015-12-19 03:55:26 +00:00
Harvey Falcic 91e93838fc unicode_strings test: manually check values instead of using assert 2014-05-24 18:00:04 -04:00
Harvey Falcic ab527b0e4b unicode_strings_runme.py: fix version check
Python 3.0.1 shouldn't pass.
2014-05-24 17:57:16 -04:00
Harvey Falcic 2533d0210f unicode_strings test: check return values 2014-05-24 16:50:33 -04:00
Harvey Falcic 5c5dfc106f Python unicode_strings test case: restrict to Python > 3.0
Also adjust the test method names and content to match the docs.
2014-05-24 15:39:53 -04:00
Harvey Falcic 791f070e66 Add "unicode_strings" test case for new Python 3 behavior 2014-05-23 15:40:01 -04:00