def test_autotune(self):

    @cuda.jit('(int32[:],)')
    def foo(xs):
        xs[0] = 1
    with self.assert_deprecation_warning() as w:
        foo.autotune
        assert (len(w) == 1)
        assert issubclass(w[(- 1)].category, DeprecationWarning)
        assert ('.autotune' in str(w[(- 1)].message))
    with self.assert_deprecation_warning() as w:
        foo.occupancy
        assert (len(w) == 2)
        assert issubclass(w[0].category, DeprecationWarning)
        assert ('.occupancy' in str(w[0].message))
        assert issubclass(w[1].category, DeprecationWarning)
        assert ('.autotune' in str(w[1].message))
def test_autotune(self):

    @cuda.jit('(int32[:],)')
    def foo(xs):
        xs[0] = 1
    with self.assert_deprecation_warning() as w:
        foo.autotune
        assert (len(w) == 1)
        assert issubclass(w[(- 1)].category, DeprecationWarning)
        assert ('.autotune' in str(w[(- 1)].message))
    with self.assert_deprecation_warning() as w:
        foo.occupancy
        assert (len(w) == 2)
        assert issubclass(w[0].category, DeprecationWarning)
        assert ('.occupancy' in str(w[0].message))
        assert issubclass(w[1].category, DeprecationWarning)
        assert ('.autotune' in str(w[1].message))