Hello. I have discovered potential error in PyCUDA test_driver.py Instead of importing py.test.skip, pytest.skip is imported; it does not work on Debian: ============================= test session starts ============================== platform linux2 -- Python 2.6.6 -- pytest-1.3.4 test path 1: test_driver.py
test_driver.py ........F...........
=================================== FAILURES
===================================
_____________________ TestDriver.test_register_host_memory
_____________________
def f(*args, **kwargs):
import pycuda.driver
# appears to be idempotent, i.e. no harm in calling it more than
once
pycuda.driver.init()
ctx = make_default_context()
try:
assert isinstance(ctx.get_device().name(), str)
assert isinstance(ctx.get_device().compute_capability(),
tuple)
assert isinstance(ctx.get_device().get_attributes(), dict)
> inner_f(*args, **kwargs)
/usr/lib/python2.6/dist-packages/pycuda/tools.py:548:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
_ _ _ _
self = <test_driver.TestDriver instance at 0x26ad0e0>
@mark_cuda_test
def test_register_host_memory(self):
if drv.get_version() < (4,):
> from pytest import skip
E ImportError: No module named pytest
test_driver.py:550: ImportError
===================== 1 failed, 19 passed in 53.69 seconds
=====================
Attached patch fixed this situation:
============================= test session starts
==============================
platform linux2 -- Python 2.6.6 -- pytest-1.3.4
test path 1: test_driver.py
test_driver.py ........s...........
===================== 19 passed, 1 skipped in 3.94 seconds
=====================
Best regards.
--
Tomasz Rybak <[email protected]> GPG/PGP key ID: 2AD5 9860
Fingerprint A481 824E 7DD3 9C0E C40A 488E C654 FB33 2AD5 9860
http://member.acm.org/~tomaszrybak
diff --git a/test/test_driver.py b/test/test_driver.py
index 3f31fcf..6328f3b 100644
--- a/test/test_driver.py
+++ b/test/test_driver.py
@@ -547,12 +547,12 @@ class TestDriver:
@mark_cuda_test
def test_register_host_memory(self):
if drv.get_version() < (4,):
- from pytest import skip
+ from py.test import skip
skip("register_host_memory only exists on CUDA 4.0 and later")
import sys
if sys.platform == "darwin":
- from pytest import skip
+ from py.test import skip
skip("register_host_memory is not supported on OS X")
a = drv.aligned_empty((2**20,), np.float64, alignment=4096)
signature.asc
Description: This is a digitally signed message part
_______________________________________________ PyCUDA mailing list [email protected] http://lists.tiker.net/listinfo/pycuda
