From c92157ff523e2a78091b0a194ee35dd5160dafd3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20v=2E=20L=C3=B6wis?= Date: Thu, 23 Mar 2006 19:14:23 +0000 Subject: [PATCH] Relax result test for program mode of quopri. --- Lib/test/test_quopri.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Lib/test/test_quopri.py b/Lib/test/test_quopri.py index daece97202a..631c9743581 100644 --- a/Lib/test/test_quopri.py +++ b/Lib/test/test_quopri.py @@ -179,14 +179,17 @@ zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz''') process = subprocess.Popen([sys.executable, "-mquopri"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) cout, cerr = process.communicate(p) - self.assert_(cout == e) + # On Windows, Python will output the result to stdout using + # CRLF, as the mode of stdout is text mode. To compare this + # with the expected result, we need to do a line-by-line comparison. + self.assert_(cout.splitlines() == e.splitlines()) def test_scriptdecode(self): (p, e) = self.STRINGS[-1] process = subprocess.Popen([sys.executable, "-mquopri", "-d"], stdin=subprocess.PIPE, stdout=subprocess.PIPE) cout, cerr = process.communicate(e) - self.assert_(cout == p) + self.assert_(cout.splitlines() == p.splitlines()) def test_main(): test_support.run_unittest(QuopriTestCase)