From d4f2cc807a3acb9a5ca5e70d123bd834c8134484 Mon Sep 17 00:00:00 2001 From: Nicolas Chauvat Date: Thu, 29 Apr 2010 18:30:15 +0200 Subject: [testlib] add option splitlines to assertTextEquals --- test/unittest_testlib.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'test/unittest_testlib.py') diff --git a/test/unittest_testlib.py b/test/unittest_testlib.py index 75b9219..6f25ea5 100644 --- a/test/unittest_testlib.py +++ b/test/unittest_testlib.py @@ -218,7 +218,9 @@ class TestlibTC(TestCase): self.assertRaises(AssertionError, self.tc.assertTextEqual, "toto", None) self.assertRaises(AssertionError, self.tc.assertTextEqual, 3.12, u"toto") self.assertRaises(AssertionError, self.tc.assertTextEqual, None, u"toto") - + self.tc.assertTextEqual('toto\ntiti', 'toto\ntiti') + self.tc.assertTextEqual('toto\ntiti', 'toto\n titi\n', striplines=True) + self.assertRaises(AssertionError, self.tc.assertTextEqual, 'toto\ntiti', 'toto\n titi\n') foo = join(dirname(__file__), 'data', 'foo.txt') spam = join(dirname(__file__), 'data', 'spam.txt') text1 = file(foo).read() -- cgit v1.2.1