diff options
author | Gregory P. Smith <greg@krypto.org> | 2015-04-14 19:58:05 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2015-04-14 19:58:05 (GMT) |
commit | 054b065f6cae1634ac35e2e73e81e8e5c4bce2d9 (patch) | |
tree | 7731c0824fa59cd5e63a30df88c216caf94c4fc9 | |
parent | e334e3ff714502a25c3270bd4cb4d9a699076deb (diff) | |
download | cpython-054b065f6cae1634ac35e2e73e81e8e5c4bce2d9.zip cpython-054b065f6cae1634ac35e2e73e81e8e5c4bce2d9.tar.gz cpython-054b065f6cae1634ac35e2e73e81e8e5c4bce2d9.tar.bz2 |
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.
-rw-r--r-- | 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 index 4d17821..47c3b51 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -719,6 +719,20 @@ class PyIOTest(IOTest): 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 @@ class PySignalsTest(SignalsTest): def load_tests(*args): - tests = (CIOTest, PyIOTest, + tests = (CIOTest, PyIOTest, CPyMatchTest, CBufferedReaderTest, PyBufferedReaderTest, CBufferedWriterTest, PyBufferedWriterTest, CBufferedRWPairTest, PyBufferedRWPairTest, |