summaryrefslogtreecommitdiff
path: root/uitest
diff options
context:
space:
mode:
authorXisco Fauli <xiscofauli@libreoffice.org>2021-12-30 12:11:42 +0100
committerXisco Fauli <xiscofauli@libreoffice.org>2021-12-30 16:44:53 +0100
commit098da417618e09692a8f574e2c5cb7af582104e9 (patch)
treeb69318f991af39012a363e5f2b50a6bae8ae5b28 /uitest
parentf1cbb458e158c8f62c9c47917f8ab0ef76ba0ced (diff)
tdf#95217: sc: simplify test
Rechecking again, I found out that the encoding problem described in tdf#95217 was actually fixed by the same commit that fixed tdf#146048 ( 3392f567be8d52804b187b0bced47204ef38fa3c < tdf#146048: detect UTF-16 without BOM > ) This commit partially reverts d7fb6b22cf7e66eb2594001cc42c6bff8b5a49e2 < tdf#95217, tdf#142600: sc: Add UItest > since we don't have to create any http server to reproduce the issue Change-Id: I2f0177f8450f77de5df756354d48505193a6ba3c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/127742 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org>
Diffstat (limited to 'uitest')
-rw-r--r--uitest/uitest/test.py26
1 files changed, 0 insertions, 26 deletions
diff --git a/uitest/uitest/test.py b/uitest/uitest/test.py
index c798e76533dd..3beee0d274f2 100644
--- a/uitest/uitest/test.py
+++ b/uitest/uitest/test.py
@@ -6,14 +6,11 @@
#
import time
-import functools
import threading
from contextlib import contextmanager
from uitest.config import DEFAULT_SLEEP
from uitest.config import MAX_WAIT
from uitest.uihelper.common import get_state_as_dict
-from http.server import HTTPServer, SimpleHTTPRequestHandler
-import os
from com.sun.star.uno import RuntimeException
@@ -271,27 +268,4 @@ class UITest(object):
time.sleep(DEFAULT_SLEEP)
raise Exception("Did not execute a dialog for a blocking action")
- @contextmanager
- def launch_HTTP_server(self, file_name):
- # Spawns an http.server.HTTPServer in a separate thread
-
- tdoc = os.getenv("TDOC")
-
- if not os.path.exists(os.path.join(tdoc, file_name)):
- raise Exception("File doesn't exists: " + file_name)
-
- # Serve in TDOC directory
- handler = functools.partial(SimpleHTTPRequestHandler, directory=tdoc)
-
- with HTTPServer(("localhost", 0), handler) as httpd:
- try:
- thread = threading.Thread(target=httpd.serve_forever)
- thread.start()
- url = "http://%s:%d/%s" % (httpd.server_name, httpd.server_port, file_name)
- yield url
- finally:
- # Call shutdown in case the testcase fails
- httpd.shutdown()
- thread.join()
-
# vim: set shiftwidth=4 softtabstop=4 expandtab: