From 659d7730baa9f8702914b7e084aafb0e99fb48f5 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Sun, 2 Jun 2013 17:15:34 +0200 Subject: Normalize path for finding api_samples dir When nova/tests/integrated and doc/api_samples are installed in different subtrees and are only combined via symlinks, running test_api_sample fails due to traversing into the wrong tree. Use path normalization to avoid this problem. Fixes: LP Bug #1186775 Change-Id: Ibe9e2442dc9bf3ba7bcb429cbac124dcaeea2cef --- nova/tests/integrated/test_api_samples.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nova/tests/integrated/test_api_samples.py b/nova/tests/integrated/test_api_samples.py index 873719ab6..c8de7243b 100644 --- a/nova/tests/integrated/test_api_samples.py +++ b/nova/tests/integrated/test_api_samples.py @@ -149,7 +149,7 @@ class ApiSampleTestBase(integrated_helpers._IntegratedTestBase): @classmethod def _get_sample(cls, name): dirname = os.path.dirname(os.path.abspath(__file__)) - dirname = os.path.join(dirname, "../../../doc") + dirname = os.path.normpath(os.path.join(dirname, "../../../doc")) return cls._get_sample_path(name, dirname) @classmethod -- cgit