summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_capi.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test/test_capi.py')
-rw-r--r--Lib/test/test_capi.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 9165f45..db029ef 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -623,6 +623,18 @@ class CAPITest(unittest.TestCase):
''')
self.check_fatal_error(code, expected)
+ def test_pyobject_repr_from_null(self):
+ s = _testcapi.pyobject_repr_from_null()
+ self.assertEqual(s, '<NULL>')
+
+ def test_pyobject_str_from_null(self):
+ s = _testcapi.pyobject_str_from_null()
+ self.assertEqual(s, '<NULL>')
+
+ def test_pyobject_bytes_from_null(self):
+ s = _testcapi.pyobject_bytes_from_null()
+ self.assertEqual(s, b'<NULL>')
+
class TestPendingCalls(unittest.TestCase):