From ce0fcef5804c1e6e0803092d881b48ceb274fd19 Mon Sep 17 00:00:00 2001 From: wiredfool Date: Fri, 12 Sep 2014 21:41:12 -0700 Subject: [PATCH] Don't test internal python functions --- Tests/test_file_eps.py | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/Tests/test_file_eps.py b/Tests/test_file_eps.py index 96b39b286..a17ce274f 100644 --- a/Tests/test_file_eps.py +++ b/Tests/test_file_eps.py @@ -167,7 +167,10 @@ class TestFileEps(PillowTestCase): def _test_readline_io(self, test_string, ending): import io - t = io.StringIO(test_string) + if str is bytes: + t = io.StringIO(unicode(test_string)) + else: + t = io.StringIO(test_string) self._test_readline(t, ending) def _test_readline_file_universal(self, test_string, ending): @@ -202,14 +205,23 @@ class TestFileEps(PillowTestCase): for ending in line_endings: s = ending.join(strings) - self._test_readline_stringio(s, ending) - self._test_readline_io(s, ending) - self._test_readline_file_universal(s, ending) + # Native python versions will pass these endings. + #self._test_readline_stringio(s, ending) + #self._test_readline_io(s, ending) + #self._test_readline_file_universal(s, ending) + + self._test_readline_file_psfile(s, ending) for ending in not_working_endings: # these only work with the PSFile, while they're in spec, # they're not likely to be used - s = ending.join(strings) + s = ending.join(strings) + + # Native python versions may fail on these endings. + #self._test_readline_stringio(s, ending) + #self._test_readline_io(s, ending) + #self._test_readline_file_universal(s, ending) + self._test_readline_file_psfile(s, ending)