]> granicus.if.org Git - python/commitdiff
Issue #25800: Fix running test_capi directly
authorZachary Ware <zachary.ware@gmail.com>
Sat, 5 Dec 2015 06:16:55 +0000 (00:16 -0600)
committerZachary Ware <zachary.ware@gmail.com>
Sat, 5 Dec 2015 06:16:55 +0000 (00:16 -0600)
Lib/test/test_capi.py

index 36c62376b1577cff0d81113fb707c383ffaad2ae..a0c1e79b3596818220a6527efebe2d1bb63c8765 100644 (file)
@@ -257,7 +257,8 @@ class Test6012(unittest.TestCase):
 
 class EmbeddingTests(unittest.TestCase):
     def setUp(self):
-        basepath = os.path.dirname(os.path.dirname(os.path.dirname(__file__)))
+        here = os.path.abspath(__file__)
+        basepath = os.path.dirname(os.path.dirname(os.path.dirname(here)))
         exename = "_testembed"
         if sys.platform.startswith("win"):
             ext = ("_d" if "_d" in sys.executable else "") + ".exe"