aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatti Picus <matti.picus@gmail.com>2020-01-26 08:36:22 +0200
committerMatti Picus <matti.picus@gmail.com>2020-01-26 08:36:22 +0200
commit5ff040a4d6d3d48dff0961476a7096662b9774a2 (patch)
treedc17f968a50fb7d3dc9eb42ccd6378908018909c /lib-python
parentmerge heads (diff)
downloadpypy-5ff040a4d6d3d48dff0961476a7096662b9774a2.tar.gz
pypy-5ff040a4d6d3d48dff0961476a7096662b9774a2.tar.bz2
pypy-5ff040a4d6d3d48dff0961476a7096662b9774a2.zip
fix curses tests and make sure ffi.string returns str for python3
Diffstat (limited to 'lib-python')
-rw-r--r--lib-python/2.7/test/test_curses.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib-python/2.7/test/test_curses.py b/lib-python/2.7/test/test_curses.py
index 8a39cd0ae4..bce014c1e0 100644
--- a/lib-python/2.7/test/test_curses.py
+++ b/lib-python/2.7/test/test_curses.py
@@ -15,7 +15,8 @@ import sys
import tempfile
import unittest
-from test.test_support import requires, import_module, verbose, run_unittest
+from test.test_support import (requires, import_module, verbose, run_unittest,
+ cpython_only)
# Optionally test curses module. This currently requires that the
# 'curses' resource be given on the regrtest command line using the -u
@@ -276,6 +277,7 @@ class TestCurses(unittest.TestCase):
msg='userptr should fail since not set'):
p.userptr()
+ @cpython_only
def test_userptr_memory_leak(self):
w = curses.newwin(10, 10)
p = curses.panel.new_panel(w)
@@ -288,6 +290,7 @@ class TestCurses(unittest.TestCase):
self.assertEqual(sys.getrefcount(obj), nrefs,
"set_userptr leaked references")
+ @cpython_only
def test_userptr_segfault(self):
panel = curses.panel.new_panel(self.stdscr)
class A: