Author: David Schneider <[email protected]>
Branch:
Changeset: r57783:17ffe013d44c
Date: 2012-10-04 15:32 -0300
http://bitbucket.org/pypy/pypy/changeset/17ffe013d44c/
Log: workaround for issue #1259, use a module that has a correct __file__
attribute to compute the path to the math_testcases.txt file
diff --git a/pypy/module/math/test/test_math.py
b/pypy/module/math/test/test_math.py
--- a/pypy/module/math/test/test_math.py
+++ b/pypy/module/math/test/test_math.py
@@ -130,7 +130,7 @@
def test_mtestfile(self):
import math
- import abc
+ import zipfile
import os
import struct
def _parse_mtestfile(fname):
@@ -207,7 +207,7 @@
fail_fmt = "{}:{}({!r}): expected {!r}, got {!r}"
failures = []
- math_testcases = os.path.join(os.path.dirname(abc.__file__), "test",
+ math_testcases = os.path.join(os.path.dirname(zipfile.__file__),
"test",
"math_testcases.txt")
for id, fn, arg, expected, flags in _parse_mtestfile(math_testcases):
func = getattr(math, fn)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit