Skip to content

Commit

Permalink
Fix flake8 and ensure setuptools present in tests that need it.
Browse files Browse the repository at this point in the history
As title.
  • Loading branch information
stuartarchibald committed Apr 19, 2023
1 parent a1bf88a commit 0d1969a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions numba/tests/test_deprecations.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
from numba import jit, generated_jit, vectorize, guvectorize
from numba.core.errors import (NumbaDeprecationWarning,
NumbaPendingDeprecationWarning, NumbaWarning)
from numba.tests.support import TestCase
from numba.tests.support import TestCase, needs_setuptools


@contextmanager
Expand Down Expand Up @@ -244,11 +244,11 @@ def bar(*args):
# @jit call.
with _catch_numba_deprecation_warnings() as w:
@vectorize('float64(float64)', forceobj=True)
def foo(x):
def foo(x): # noqa : F811
return bar(x + 1)

@jit
def bar(x):
def bar(x): # noqa : F811
return x

msg = "The 'nopython' keyword argument was not supplied"
Expand Down Expand Up @@ -354,6 +354,7 @@ def foo():
self.check_warning(w, "numba.generated_jit is deprecated",
NumbaDeprecationWarning)

@needs_setuptools
@TestCase.run_test_in_subprocess
def test_pycc_module(self):
# checks import of module warns
Expand All @@ -366,6 +367,7 @@ def test_pycc_module(self):
expected_str = ("The 'pycc' module is pending deprecation.")
self.check_warning(w, expected_str, NumbaPendingDeprecationWarning)

@needs_setuptools
@TestCase.run_test_in_subprocess
def test_pycc_CC(self):
# check the most commonly used functionality (CC) warns
Expand Down

0 comments on commit 0d1969a

Please sign in to comment.