Skip to content
Snippets Groups Projects
Commit e0120b43 authored by Pierre Riteau's avatar Pierre Riteau
Browse files

Fix unit tests on macOS

This unit test was failing because /tmp is a symlink to /private/tmp on
macOS. _detect_install_prefix() returns a different path because it
calls os.path.realpath().

Change-Id: I2482c86efebd66a5d22a761df82763cecd764386
parent e96bd330
No related branches found
No related tags found
No related merge requests found
......@@ -124,8 +124,9 @@ key2: value2
self.assertEqual(expected, utils.escape_jinja(value))
def test_detect_install_prefix(self):
path = "/tmp/test/local/lib/python3.6/dist-packages"
expected = os.path.normpath("/tmp/test/local/")
tmp_path = os.path.realpath('/tmp')
path = "%s/test/local/lib/python3.6/dist-packages" % tmp_path
expected = os.path.normpath("%s/test/local/" % tmp_path)
result = utils._detect_install_prefix(path)
self.assertEqual(expected, os.path.normpath(result))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment