[Libreoffice-commits] core.git: sw/qa

Stephan Bergmann (via logerrit) logerrit at kemper.freedesktop.org
Fri Feb 5 08:33:35 UTC 2021


 sw/qa/uitest/writer_tests7/tdf139301.py |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

New commits:
commit 8cc78b527bf2b7dcaaff73d8f0770f3d324ac839
Author:     Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Fri Feb 5 08:18:22 2021 +0100
Commit:     Stephan Bergmann <sbergman at redhat.com>
CommitDate: Fri Feb 5 09:32:53 2021 +0100

    Avoid test_tdf139301 hanging upon failure
    
    At least in my local Linux build, UITest_writer_tests7
    UITEST_TEST_NAME=tdf139301.tdf139301.test_tdf139301, as introduced with
    183c06fc02a50fb117bb6162e4d6e56cdd34fad1 "tdf#139301 fix OOXML-compatible preset
    dash styles", consistently fails (for whatever reason) with
    
    > FAIL: test_tdf139301 (tdf139301.tdf139301)
    > ----------------------------------------------------------------------
    > Traceback (most recent call last):
    >   File "~/lo/core/sw/qa/uitest/writer_tests7/tdf139301.py", line 40, in test_tdf139301
    >     self.assertEqual(style, styles[i])
    > AssertionError: 'Dash Dot Dot' != 'Dot'
    > - Dash Dot Dot
    > + Dot
    
    and then would hang in tearDown (presumably because the
    
      self.ui_test.close_dialog_through_button(xOKBtn)
    
    line would be skipped due to the AssertionError being thrown).
    
    While this commit does not fix the failing test, it at least makes it no longer
    hang.
    
    Change-Id: I80fd88d1668b162166a971f1a7bef1b5f965c421
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/110452
    Tested-by: Jenkins
    Reviewed-by: Stephan Bergmann <sbergman at redhat.com>

diff --git a/sw/qa/uitest/writer_tests7/tdf139301.py b/sw/qa/uitest/writer_tests7/tdf139301.py
index 87d36d35a951..6064528bf166 100644
--- a/sw/qa/uitest/writer_tests7/tdf139301.py
+++ b/sw/qa/uitest/writer_tests7/tdf139301.py
@@ -30,12 +30,14 @@ class tdf139301(UITestCase):
             xLineStyle = xFormatLineDlg.getChild("LB_LINE_STYLE")
 
             # preset line style
-            self.assertEqual(get_state_as_dict(xLineStyle)['SelectEntryText'], styles[i])
+            style = get_state_as_dict(xLineStyle)['SelectEntryText']
 
             xOKBtn = xFormatLineDlg.getChild("ok")
             self.ui_test.close_dialog_through_button(xOKBtn)
 
             self.ui_test.close_doc()
 
+            self.assertEqual(style, styles[i])
+
 # vim: set shiftwidth=4 softtabstop=4 expandtab:
 


More information about the Libreoffice-commits mailing list