Skip to content

Commit 646fe26

Browse files
authored
Merge pull request #786 from Kaggle/split-pycuda
Split pycuda test into its own test file
2 parents b47e95c + 1423d61 commit 646fe26

File tree

2 files changed

+14
-10
lines changed

2 files changed

+14
-10
lines changed

tests/test_nvidia.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
"""Tests for general GPU support"""
22

3-
import os
43
import subprocess
5-
import sys
64
import unittest
75

86
from common import gpu_test
@@ -14,11 +12,3 @@ def test_system_management_interface(self):
1412
smi = subprocess.Popen(['nvidia-smi'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
1513
smi.communicate()
1614
self.assertEqual(0, smi.returncode)
17-
18-
@gpu_test
19-
def test_pycuda(self):
20-
import pycuda.driver
21-
pycuda.driver.init()
22-
gpu_name = pycuda.driver.Device(0).name()
23-
self.assertNotEqual(0, len(gpu_name))
24-

tests/test_pycuda.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
"""Tests for general GPU support"""
2+
3+
import unittest
4+
5+
from common import gpu_test
6+
7+
8+
class TestPycuda(unittest.TestCase):
9+
@gpu_test
10+
def test_pycuda(self):
11+
import pycuda.driver
12+
pycuda.driver.init()
13+
gpu_name = pycuda.driver.Device(0).name()
14+
self.assertNotEqual(0, len(gpu_name))

0 commit comments

Comments
 (0)