summaryrefslogtreecommitdiff
path: root/dev-python/astunparse/files/astunparse-1.6.2-tests.patch
blob: b82c22831a9b02a4fa4fbfe6b81afb646f346c93 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
diff --git a/tests/common.py b/tests/common.py
index 95b9755..41123de 100644
--- a/tests/common.py
+++ b/tests/common.py
@@ -1,6 +1,7 @@
 import codecs
 import os
 import sys
+import site
 if sys.version_info < (2, 7):
     import unittest2 as unittest
 else:
@@ -175,9 +176,7 @@ class AstunparseCommonTestCase:
     def check_roundtrip(self, code1, filename="internal", mode="exec"):
         raise NotImplementedError()
 
-    test_directories = [
-        os.path.join(getattr(sys, 'real_prefix', sys.prefix),
-                     'lib', 'python%s.%s' % sys.version_info[:2])]
+    test_directories = [os.path.dirname(d) for d in site.getsitepackages()]
 
     def test_files(self):
         names = []