summaryrefslogtreecommitdiff
path: root/tests/test_gi.py
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2017-03-23 17:59:55 +0100
committerChristoph Reiter <creiter@src.gnome.org>2017-03-24 08:36:34 +0100
commit30228a98299eeb540fd014b9519a9efd4a434d4b (patch)
tree19621167b7b90e1116695d7fd1938d0d5c1a8fa7 /tests/test_gi.py
parent23deef70102657e75e07e54b4378c20214c867f3 (diff)
downloadpygobject-30228a98299eeb540fd014b9519a9efd4a434d4b.tar.gz
tests: Make test suite run on Windows
(in a msys2 environment) * Replace LD_LIBRARY_PATH with gir code in runtests.py * Remove unneeded runtests-windows.py * Unset MSYSTEM to disable path separator hacks by msys2 * Set sys.path in runtests.py * Skip various tests failing/hanging/crashing on Windows https://bugzilla.gnome.org/show_bug.cgi?id=780396
Diffstat (limited to 'tests/test_gi.py')
-rw-r--r--tests/test_gi.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/tests/test_gi.py b/tests/test_gi.py
index c545d5de..b18d835c 100644
--- a/tests/test_gi.py
+++ b/tests/test_gi.py
@@ -714,11 +714,12 @@ class TestFilename(unittest.TestCase):
self.assertTrue(GIMarshallingTests.filename_copy(None) is None)
self.assertRaises(TypeError, GIMarshallingTests.filename_exists, None)
+ @unittest.skipIf(os.name == "nt", "fixme")
def test_filename_out(self):
self.assertRaises(GLib.GError, GLib.Dir.make_tmp, 'test')
dirname = GLib.Dir.make_tmp('testäø.XXXXXX')
- self.assertTrue('/testäø.' in dirname, dirname)
+ self.assertTrue(os.path.sep + 'testäø.' in dirname, dirname)
dirname = _bytes(dirname)
self.assertTrue(os.path.isdir(dirname))
os.rmdir(dirname)
@@ -1486,7 +1487,7 @@ class TestEnum(unittest.TestCase):
Run test under a locale which defines toupper('a') == 'a'
'''
- if sys.platform == "darwin":
+ if sys.platform == "darwin" or os.name == "nt":
return
cls.locale_dir = tempfile.mkdtemp()
src = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'te_ST@nouppera')
@@ -1497,7 +1498,7 @@ class TestEnum(unittest.TestCase):
@classmethod
def tearDownClass(cls):
- if sys.platform == "darwin":
+ if sys.platform == "darwin" or os.name == "nt":
return
locale.setlocale(locale.LC_ALL, 'C')
shutil.rmtree(cls.locale_dir)