gentoo/dev-python/astunparse/files/astunparse-1.6.2-tests.patch
Patrick McLean 7d989fd8c1
dev-python/astunparse-1.6.2: enable tests, add py38
Copyright: Sony Interactive Entertainment Inc.
Package-Manager: Portage-2.3.99, Repoman-2.3.22
Signed-off-by: Patrick McLean <chutzpah@gentoo.org>
2020-05-06 17:16:23 -07:00

24 lines
707 B
Diff

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 = []