[pypy-commit] cffi default: This test runs twice (in two subclasses), so we need to avoid the file

arigo noreply at buildbot.pypy.org
Sat Aug 11 21:40:27 CEST 2012


Author: Armin Rigo <arigo at tunes.org>
Branch: 
Changeset: r803:a50dd89d37a1
Date: 2012-08-11 21:40 +0200
http://bitbucket.org/cffi/cffi/changeset/a50dd89d37a1/

Log:	This test runs twice (in two subclasses), so we need to avoid the
	file name collision for Windows.

diff --git a/testing/test_zdistutils.py b/testing/test_zdistutils.py
--- a/testing/test_zdistutils.py
+++ b/testing/test_zdistutils.py
@@ -67,10 +67,11 @@
         ffi.cdef("double sin(double x);")
         csrc = '/*hi there!2*/\n#include <math.h>\n'
         v = Verifier(ffi, csrc, force_generic_engine=self.generic)
-        v.modulefilename = filename = str(udir.join('test_compile_module.so'))
+        basename = self.__class__.__name__ + 'test_compile_module'
+        v.modulefilename = filename = str(udir.join(basename + '.so'))
         v.compile_module()
         assert filename == v.modulefilename
-        assert v.get_module_name() == 'test_compile_module'
+        assert v.get_module_name() == basename
         if v.generates_python_module():
             mod = imp.load_dynamic(v.get_module_name(), v.modulefilename)
             assert hasattr(mod, '_cffi_setup')


More information about the pypy-commit mailing list