summaryrefslogtreecommitdiff
path: root/sfx2/qa/python
AgeCommit message (Collapse)Author
2023-12-27tdf#158803 Fix issues detected by pyflakesChenxiong Qi
Change-Id: Iaa329dff61db894e7d5fecd840e785a53a48b26f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/160889 Tested-by: Jenkins Reviewed-by: Hossein <hossein@libreoffice.org>
2018-09-07DeInitVCL in PythonTestStephan Bergmann
After b9757f5cfdb62b24e79eeb4c0ef0c8b98056cecf "loplugin:useuniqueptr in vcl/svdata" ASan/UBSan builds started to fail (like <https://ci.libreoffice.org//job/lo_ubsan/1025/>) at the end of PythonTest_dbaccess_python (and probably other PythonTests), when during exit the static utl::ConfigManager instance already happens to be destroyed by the time the static ImplSVData's mpSettingsConfigItem is destroyed (which would normally be cleared during DeInitVCL, if PythonTests would call that, and which in the past had thus simply been leaked in PythonTests when that mpSettingsConfigItem was a plain pointer instead of std::unique_ptr). So ensure that PythonTests that initialize VCL also call DeInitVCL, via a new private_deinitTestEnvironment, complementing the existing private_initTestEnvironment. However, while private_initTestEnvironment is called once (typically via UnoInProcess.setUp, which internally makes sure to only call it once) as soon as the first executed test needs it, private_deinitTestEnvironment must be called once after the lasts test needing it has executed. The only way that I found to do that is to override unittest.TextTestResult's stopTestRun method, which is called once after all tests have been executed. Hence a new test runner setup in unotest/source/python/org/libreoffice/unittest.py that is now called from solenv/gbuild/PythonTest.mk. That revealed a few places in PythonTests that didn't yet close/delete documents that they had opened, which has now been added. One remaining problem then is that classes like SwXTextDocument and friends call Application::GetSolarMutex from their dtors, via sw::UnoImplPtrDeleter (a "Smart pointer class ensuring that the pointed object is deleted with a locked SolarMutex", sw/inc/unobaseclass.hxx). That means that any PyUNO proxies to such C++ objects that remain alive after private_deinitTestEnvironment will cause issues at exit, when Python does a final garbage collection of those objects. The ultimate fix will be to remove that unhelpful UnoImplPtrDeleter and its locking of SolarMutex from the dtors of UNO objects; until then, the Python code is now sprinkled with some HACKs to make sure all those PyUNO proxies are released in a timely fashion (see the comment in unotest/source/python/org/libreoffice/unittest.py for details). (Also, it would probably help if UnoInProcess didn't keep a local self.xDoc around referencing (just) the last result of calling one of its open* methods, confusingly making it the responsibility of UnoInProcess to close that one document while making it the responsibility of the test code making the other UnoInProcess.open* calls to close any other documents.) Change-Id: Ief27c81e2b763e9be20cbf3234b68924315f13be Reviewed-on: https://gerrit.libreoffice.org/60100 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-06-26Fix typosAndrea Gelmini
Change-Id: I2ce725f87ee6f8ebcffbac268cc7e7f8850023e5 Reviewed-on: https://gerrit.libreoffice.org/39232 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2017-05-04Fix spellingTor Lillqvist
Alternatively, we could build a higher wall. Change-Id: Id2ba91c85557ed6ac9e45ba2d9f51ca0e019cd32
2017-01-09tdf#97361: Changed method calls in sfx2 python testskerem
Change-Id: Id47bf9c6bb6330bf964ca3272487a077fb664137 Reviewed-on: https://gerrit.libreoffice.org/32838 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-12-20tdf#97361: Changed naming in sfx2 python testskerem
Change-Id: Iabacaff8fd7f282a903885954a7d725ceb6f6c16 Reviewed-on: https://gerrit.libreoffice.org/32118 Reviewed-by: Michael Stahl <mstahl@redhat.com> Tested-by: Michael Stahl <mstahl@redhat.com>
2016-12-05tdf#97361 remove = None assignments in sfx2 python unit testskerem
Change-Id: Iba3926d1b044ade69e1306941ed70b644dc577d6 Reviewed-on: https://gerrit.libreoffice.org/31602 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-10-26normalize existing emacs/vim mode-lines in python filesMichael Stahl
Bunch of these were setting C++ or Make modes and icky tabs... Also, reportedly Emacs can figure out to enable python-mode automatically. Change-Id: I50072488fb92cb4d27aa3f74f717a28ae3967543
2015-09-15Rename Sidebar.xcu node names to be meaningfulLaurent Godard
+ prefixe with Sd, Sw, Sc if only one application context, no prefix otherwise + uniformize implicit convention nodeName = Id + unit test + check nodeName/Id + panels are bound to existing deck Change-Id: I4ccc39008ebf5b5820d09472abfd45d2813e8c96 Reviewed-on: https://gerrit.libreoffice.org/18570 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
2015-09-02sideber uno api test less dependant to panels orderLaurent Godard
Change-Id: I3a4ef006becbce70897505a6f3367c4b004e13b0 Reviewed-on: https://gerrit.libreoffice.org/18239 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
2015-09-01PythonTest_sfx2_python: StylesPropertyPanel is the first panel nowMaxim Monastirsky
Change-Id: I352f14741dd9346bb41d4e3233b256898809773e
2015-09-01Fix PythonTest_sfx2_pythonMiklos Vajna
Adapt to 1ba1a21aa6b77ef8d3d59b3658dfd2aa87d0dee2 (tdf#73071 Enable styles content panel in calc and fix spacing issue), but the second assert should be ideally 100 and not 99 what it is actually, so comment that out for now. Change-Id: I551640c9db57285942a897eeb57515939ed3510d
2015-06-23Uno api sidebar unit test tdf#91806Laurent Godard
- python test subsequentcheck - correct deck setTitle APi (UI update) - enhance UnoInProcess for flexiility in loading parameter Change-Id: Id04cb78c6162ac84fb3bfd8577f84763109d993e Reviewed-on: https://gerrit.libreoffice.org/16180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>