Version 6.1.0.2, tag libreoffice-6.1.0.2
[LibreOffice.git] / sw / qa / python / get_expression.py
blob7462db68a730337fb2713f7a45a483adc0e84885
1 #! /usr/bin/env python
2 # -*- tab-width: 4; indent-tabs-mode: nil; py-indent-offset: 4 -*-
4 # This file is part of the LibreOffice project.
6 # This Source Code Form is subject to the terms of the Mozilla Public
7 # License, v. 2.0. If a copy of the MPL was not distributed with this
8 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
10 import unittest
11 from org.libreoffice.unotest import UnoInProcess
14 class TestGetExpression(unittest.TestCase):
16 @classmethod
17 def setUpClass(cls):
18 cls._uno = UnoInProcess()
19 cls._uno.setUp()
20 cls._xDoc = cls._uno.openEmptyWriterDoc()
22 @classmethod
23 def tearDownClass(cls):
24 cls._uno.tearDown()
26 def test_get_expression(self):
27 self.__class__._uno.checkProperties(
28 self.__class__._xDoc.createInstance("com.sun.star.text.textfield.GetExpression"),
29 {"Content": "foo",
30 "CurrentPresentation": "bar",
31 "NumberFormat": 0,
32 "IsShowFormula": False,
33 "SubType": 0,
34 "VariableSubtype": 1,
35 "IsFixedLanguage": False,
37 self
40 # property 'Value' is read only?
41 @unittest.expectedFailure
42 def test_get_expression_veto_read_only(self):
43 self.__class__._uno.checkProperties(
44 self.__class__._xDoc.createInstance("com.sun.star.text.textfield.GetExpression"),
45 {"Value": 0.0},
46 self
49 if __name__ == '__main__':
50 unittest.main()