[Python-checkins] cpython: issue9859: Adds a CPyMatchTest test case to compare the exposed APIs
gregory.p.smith
python-checkins at python.org
Tue Apr 14 21:58:55 CEST 2015
https://hg.python.org/cpython/rev/0b6c894c3c96
changeset: 95655:0b6c894c3c96
user: Gregory P. Smith <greg at krypto.org>
date: Tue Apr 14 12:58:05 2015 -0700
summary:
issue9859: Adds a CPyMatchTest test case to compare the exposed APIs
of the Python io module and the C io module. They do not currently
match so the failing test is marked with @unittest.skip.
files:
Lib/test/test_io.py | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -719,6 +719,20 @@
pass
+class CPyMatchTest(unittest.TestCase):
+
+ @unittest.skip('test to be fixed by issue 9858')
+ def test_RawIOBase_io_in_pyio_match(self):
+ """Test that pyio RawIOBase class has all c RawIOBase methods"""
+ mismatch = support.detect_api_mismatch(pyio.RawIOBase, io.RawIOBase)
+ self.assertEqual(mismatch, set(), msg='Python RawIOBase does not have all C RawIOBase methods')
+
+ def test_RawIOBase_pyio_in_io_match(self):
+ """Test that c RawIOBase class has all pyio RawIOBase methods"""
+ mismatch = support.detect_api_mismatch(io.RawIOBase, pyio.RawIOBase)
+ self.assertEqual(mismatch, set(), msg='C RawIOBase does not have all Python RawIOBase methods')
+
+
class CommonBufferedTests:
# Tests common to BufferedReader, BufferedWriter and BufferedRandom
@@ -3719,7 +3733,7 @@
def load_tests(*args):
- tests = (CIOTest, PyIOTest,
+ tests = (CIOTest, PyIOTest, CPyMatchTest,
CBufferedReaderTest, PyBufferedReaderTest,
CBufferedWriterTest, PyBufferedWriterTest,
CBufferedRWPairTest, PyBufferedRWPairTest,
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list