From 2c092f352e8cd8e8013ad9ec01add73ddcfc427f Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Sat, 21 Sep 2013 14:25:39 +0200 Subject: make the PythonTest run on WNT - fix the PATH - file url needs to start with file:///X:/ (three slashes, literal :) Change-Id: I0d16d1e946fd06ba5523961c23c3b46872c0c050 --- unotest/source/python/org/libreoffice/unotest.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'unotest/source/python') diff --git a/unotest/source/python/org/libreoffice/unotest.py b/unotest/source/python/org/libreoffice/unotest.py index 883d3a40e47e..3da77ffdbd3e 100644 --- a/unotest/source/python/org/libreoffice/unotest.py +++ b/unotest/source/python/org/libreoffice/unotest.py @@ -193,7 +193,11 @@ class UnoInProcess: props = [("Hidden", True), ("ReadOnly", False), ("AsTemplate", True)] loadProps = tuple([mkPropertyValue(name, value) for (name, value) in props]) path = os.getenv("TDOC") - url = "file://" + quote(path) + "/" + quote(file) + if os.name == "nt": + # do not quote drive letter - it must be "X:" + url = "file:///" + path + "/" + quote(file) + else: + url = "file://" + quote(path) + "/" + quote(file) self.xDoc = desktop.loadComponentFromURL(url, "_blank", 0, loadProps) assert(self.xDoc) return self.xDoc -- cgit