Commit 350ef5f6 authored by Vitezslav Humpa's avatar Vitezslav Humpa
Browse files

TestUnicodeNames: Covered the most troublesome py2 __future vs. py3 cases

parent a85dc8fa
Pipeline #2097686 failed with stages
......@@ -8,6 +8,8 @@ import dogtail.rawinput
from gtkdemotest import GtkDemoTest, trap_stdout
import pyatspi
import time
import unittest
import os
Unit tests for the dogtail.Node class
......@@ -857,6 +859,53 @@ class TestSearching(GtkDemoTest):
self.assertIsNotNone(wnd.button("Message Dialog"))
# A painful point of collision between strings in python2 and python3!
@unittest.skipIf(os.system('ls /usr/bin/gedit') != 0, "Skipping, need gedit")
class TestUnicodeNames(unittest.TestCase):
def setUp(self):
import dogtail.config
dogtail.config.config.logDebugToStdOut = True
dogtail.config.config.logDebugToFile = True
dogtail.config.config.logDebugToStdOut = True
dogtail.config.config.debugSearching = True
dogtail.config.config.searchCutoffCount = 3
import dogtail.utils ='gedit') = dogtail.tree.root.application('gedit')
def test_unicode_char_in_name(self):'Open', roleName='toggle button').click()
unicode_button = None
unicode_button ='Other Documents…', roleName='push button')
assert unicode_button is not None
def test_unicode_char_in_name_click(self):'Open', roleName='toggle button').click()
unicode_button ='Other Documents…', roleName='push button')
dialog = None
dialog ='Open', roleName='file chooser')
except dogtail.tree.SearchError:
assert dialog is not None
def test_unicode_logging_nocrash(self):
try:'…Other stuff…', roleName='push button')
except dogtail.tree.SearchError:
def tearDown(self):
import signal
os.kill(, signal.SIGKILL)
os.system('killall gedit > /dev/null 2>&1')
# Sleep just enough to let the app actually die.
# AT-SPI doesn't like being hammered too fast.
class TestDump(GtkDemoTest):
def test_dump_to_stdout(self):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment