test_nvrtc.py 276 Bytes
Newer Older
root's avatar
root committed
1
2
3
4
5
6
7
8
9
10
11
12
13
import pickle
import unittest

from cupy.cuda import nvrtc


class TestExceptionPicklable(unittest.TestCase):

    def test(self):
        e1 = nvrtc.NVRTCError(1)
        e2 = pickle.loads(pickle.dumps(e1))
        assert e1.args == e2.args
        assert str(e1) == str(e2)