Python unicode_strings test case: restrict to Python > 3.0

Also adjust the test method names and content to match the docs.
This commit is contained in:
Harvey Falcic 2014-05-24 15:39:53 -04:00
commit 5c5dfc106f
2 changed files with 9 additions and 6 deletions

View file

@ -1,4 +1,7 @@
import sys
import unicode_strings import unicode_strings
unicode_strings.test_c_str() if sys.version_info > (3, 0):
unicode_strings.test_std_string() unicode_strings.non_utf8_c_str()
unicode_strings.non_utf8_std_string()

View file

@ -4,12 +4,12 @@
%inline %{ %inline %{
const char* test_c_str(void) { const char* non_utf8_c_str(void) {
return "h\xe9llo"; return "h\xe9llo w\xc3\xb6rld";
} }
std::string test_std_string(void) { std::string non_utf8_std_string(void) {
return std::string("h\xe9llo"); return std::string("h\xe9llo w\xc3\xb6rld");
} }
%} %}