summaryrefslogtreecommitdiff
path: root/testtools/source
diff options
context:
space:
mode:
authorIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-29 14:59:25 +0300
committerIlmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>2024-07-29 16:56:57 +0200
commit129e69f005d4752bb5ec10a8c12d842037394822 (patch)
treec015fc88bb30e60315b3f11b448d49be72f96a33 /testtools/source
parent4c3f65ea3b1f2e7f6d92c732f72936fecc017b29 (diff)
testtools, wizards, xmlsecurity: fix issues found by Ruff linter
Change-Id: I03edbaa7c9a643ca7503fa0e93c2bf0de3ac4e51 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/171211 Tested-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org> Tested-by: Jenkins Reviewed-by: Ilmari Lauhakangas <ilmari.lauhakangas@libreoffice.org>
Diffstat (limited to 'testtools/source')
-rw-r--r--testtools/source/bridgetest/pyuno/impl.py4
-rw-r--r--testtools/source/bridgetest/pyuno/importer.py6
2 files changed, 5 insertions, 5 deletions
diff --git a/testtools/source/bridgetest/pyuno/impl.py b/testtools/source/bridgetest/pyuno/impl.py
index c95622022548..e6062c9e5360 100644
--- a/testtools/source/bridgetest/pyuno/impl.py
+++ b/testtools/source/bridgetest/pyuno/impl.py
@@ -169,8 +169,8 @@ class TestHelperCase( unittest.TestCase ):
try:
uno.setCurrentContext(
unohelper.CurrentContext( oldContext,{"My42":42}) )
- self.assertTrue( 42 == uno.getCurrentContext().getValueByName( "My42" ) )
- self.assertTrue( None == uno.getCurrentContext().getValueByName( "My43" ) )
+ self.assertTrue( uno.getCurrentContext().getValueByName( "My42" ) == 42 )
+ self.assertTrue( uno.getCurrentContext().getValueByName( "My43" ) is None )
finally:
uno.setCurrentContext( oldContext )
diff --git a/testtools/source/bridgetest/pyuno/importer.py b/testtools/source/bridgetest/pyuno/importer.py
index c3fc20eed039..3ed02d76d9d0 100644
--- a/testtools/source/bridgetest/pyuno/importer.py
+++ b/testtools/source/bridgetest/pyuno/importer.py
@@ -32,7 +32,7 @@ class ImporterTestCase(unittest.TestCase):
"com.sun.star.test.bridge.CppTestObject",self.ctx)
def testStandard( self ):
- self.assertTrue( IllegalArgumentException != None, "none-test" )
+ self.assertTrue( IllegalArgumentException is not None, "none-test" )
self.assertRaises( IllegalArgumentException, self.tobj.raiseException, 1,"foo",self.tobj)
self.assertTrue( TWO == uno.Enum( "test.testtools.bridgetest.TestEnum","TWO"), "enum" )
@@ -49,10 +49,10 @@ class ImporterTestCase(unittest.TestCase):
def testDynamicComponentRegistration( self ):
ctx = uno.getComponentContext()
self.assertTrue(
- not ("com.sun.star.connection.Acceptor" in ctx.ServiceManager.getAvailableServiceNames()),
+ "com.sun.star.connection.Acceptor" not in ctx.ServiceManager.getAvailableServiceNames(),
"precondition for dynamic component registration test is not fulfilled" )
self.assertTrue(
- not ("com.sun.star.connection.Connector" in ctx.ServiceManager.getAvailableServiceNames()),
+ "com.sun.star.connection.Connector" not in ctx.ServiceManager.getAvailableServiceNames(),
"precondition for dynamic component registration test is not fulfilled" )
unohelper.addComponentsToContext(
ctx , ctx, ("acceptor.uno","connector.uno"), "com.sun.star.loader.SharedLibrary" )