From 7d87b52021e4fc4f69922729cad1fcd19b211615 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 2 Aug 2012 05:39:41 +0000 Subject: [PATCH] Fix tests for OSX git-svn-id: https://svn.wxwidgets.org/svn/wx/wxPython/Phoenix/trunk@72277 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- unittests/test_lib_colourdb.py | 4 ++-- unittests/test_lib_expando.py | 6 +++++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/unittests/test_lib_colourdb.py b/unittests/test_lib_colourdb.py index aafe5c90..3fc0c980 100644 --- a/unittests/test_lib_colourdb.py +++ b/unittests/test_lib_colourdb.py @@ -19,8 +19,8 @@ class lib_colourdb_Tests(wtc.WidgetTestCase): self.assertEqual(wx.TheColourDatabase.Find('ORANGERED1'), wx.Colour(255, 69, 0, 255)) - self.assertEqual(wx.TheColourDatabase.FindName(wx.Colour(255, 69, 0)), - 'ORANGE RED') + self.assertIn(wx.TheColourDatabase.FindName(wx.Colour(255, 69, 0)), + ['ORANGE RED', 'ORANGERED']) #--------------------------------------------------------------------------- diff --git a/unittests/test_lib_expando.py b/unittests/test_lib_expando.py index ac9f16dd..025aca95 100644 --- a/unittests/test_lib_expando.py +++ b/unittests/test_lib_expando.py @@ -16,7 +16,11 @@ class lib_expando_Tests(wtc.WidgetTestCase): bs2 = w.GetSize() self.assertEqual(w.GetValue(), "This is a test\nThis is a New Label") - self.assertEqual(w.GetNumberOfLines(), 3) + + # All we can test here is that we have more lines than we started + # with, since different platforms may wrap at different spots in the + # string. + self.assertTrue(w.GetNumberOfLines() > 2) self.assertTrue(bs2.height > bs1.height) #---------------------------------------------------------------------------