Skip to content

Commit

Permalink
Remove pytest.mark.module usage
Browse files Browse the repository at this point in the history
I never use it and we get some warnings about it.
  • Loading branch information
serge-sans-paille committed Oct 15, 2023
1 parent b4a3abc commit 22c90ab
Show file tree
Hide file tree
Showing 21 changed files with 0 additions and 32 deletions.
4 changes: 0 additions & 4 deletions docs/DEVGUIDE.rst
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,6 @@ test suite::

runs all the tests found in ``pythran/tests/test_list.py``.

Only compiler tests can be check using test filtering::

$> pytest -n 8 pythran/tests -m "not module"

There are two kinds of tests in ``pythran``:

1. unit tests that test a specific feature of the implementation. Such tests
Expand Down
3 changes: 0 additions & 3 deletions pythran/tests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@
from operator import add
import logging

import pytest

from pythran import compile_pythrancode, spec_parser, load_specfile, frontend
from pythran.backend import Python
from pythran.middlend import refine
Expand Down Expand Up @@ -69,7 +67,6 @@ class TestEnv(unittest.TestCase):

""" Test environment to validate a pythran execution against python. """

module = pytest.mark.module
# default options used for the c++ compiler
PYTHRAN_CXX_FLAGS = ['-O0', '-UNDEBUG', '-U_FORTIFY_SOURCE',
] if sys.platform != "win32" else []
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_bisect.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
from pythran.typing import List


@TestEnv.module
class TestBisect(TestEnv):
def test_bisect_left0(self):
self.run_test("def bisect_left0(l,a): from bisect import bisect_left ; return bisect_left(l,a)", [0,1,2,3],2, bisect_left0=[List[int],int])
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_itertools.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pythran.typing import List, NDArray


@TestEnv.module
class TestItertools(TestEnv):

def test_imap(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_math.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pythran.tests import TestEnv


@TestEnv.module
class TestMath(TestEnv):

def test_cos_(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_ndarray.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ def raisesMemoryError():
return False


@TestEnv.module
class TestNdarray(TestEnv):

@unittest.skipIf(not raisesMemoryError(), "memory error not triggered on that arch")
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_broadcasting.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from pythran.typing import NDArray, List, Tuple


@TestEnv.module
class TestBroadcasting(TestEnv):

def test_broadcast_scalar0(self):
Expand Down
7 changes: 0 additions & 7 deletions pythran/tests/test_numpy_fft.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
from distutils.version import LooseVersion


@TestEnv.module
class TestNumpyRFFT(TestEnv):

# Basic test
Expand Down Expand Up @@ -71,7 +70,6 @@ def test_rfft_byte(self):
self.run_test("def test_rfft_byte(x): from numpy.fft import rfft ; return rfft(x)", (100*numpy.random.random(128)).astype(numpy.byte), test_rfft_byte=[NDArray[numpy.byte,:]])


@TestEnv.module
class TestNumpyFFTN(TestEnv):

# Basic test
Expand Down Expand Up @@ -175,7 +173,6 @@ def test_fftn_22(self):
self.run_test("def test_fftn_22(x): from numpy.fft import fftn ; return fftn(x, (10,), axes=(2,))",
numpy.arange(0, 24.).reshape(2, 4, 3) + 1.j, test_fftn_22=[NDArray[complex,:,:, :]])

@TestEnv.module
class TestNumpyIRFFT(TestEnv):
############# IRFFT
# Basic test
Expand Down Expand Up @@ -245,7 +242,6 @@ def test_irfft_int64(self):
def test_irfft_byte(self):
self.run_test("def test_irfft_byte(x): from numpy.fft import irfft ; return irfft(x)", (100*numpy.random.random(128)).astype(numpy.byte), test_irfft_byte=[NDArray[numpy.byte,:]])

@TestEnv.module
class TestNumpyIHFFT(TestEnv):

# Basic test
Expand Down Expand Up @@ -311,7 +307,6 @@ def test_ihfft_byte(self):
self.run_test("def test_ihfft_byte(x): from numpy.fft import ihfft ; return ihfft(x)", (100*numpy.random.random(128)).astype(numpy.byte), test_ihfft_byte=[NDArray[numpy.byte,:]])


@TestEnv.module
class TestNumpyHFFT(TestEnv):
############# hfft
# Basic test
Expand Down Expand Up @@ -383,7 +378,6 @@ def test_hfft_int64(self):
def test_hfft_byte(self):
self.run_test("def test_hfft_byte(x): from numpy.fft import hfft ; return hfft(x)", (100*numpy.random.random(128)).astype(numpy.byte), test_hfft_byte=[NDArray[numpy.byte,:]])

@TestEnv.module
class TestNumpyFFT(TestEnv):
# complex inputs
def test_fft_1d_1(self):
Expand Down Expand Up @@ -575,7 +569,6 @@ def test_fft_int64_parallel(x):
return np.concatenate(out)
""", (numpy.random.randn(512)).reshape((4,128)).astype(numpy.int64), test_fft_int64_parallel=[NDArray[numpy.int64, :, :]])

@TestEnv.module
class TestNumpyIFFT(TestEnv):
# complex inputs
def test_ifft_1d_1(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_func0.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
from pythran.typing import NDArray, List, Tuple


@TestEnv.module
class TestNumpyFunc0(TestEnv):

def test_extended_sum0(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_func1.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
np_version = version.parse(numpy.version.version)


@TestEnv.module
class TestNumpyFunc1(TestEnv):

def test_sum_bool2(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_func2.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
np_version = version.parse(numpy.version.version)


@TestEnv.module
class TestNumpyFunc2(TestEnv):

def test_nonzero0(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_func3.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from pythran.tests import TestEnv


@TestEnv.module
class TestNumpyFunc3(TestEnv):

"""
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_linalg.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pythran.typing import NDArray


@TestEnv.module
class TestNumpyLinalg(TestEnv):

def test_linalg_norm0(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
warnings.filterwarnings("ignore",category=DeprecationWarning)


@TestEnv.module
class TestNumpyRandom(TestEnv):

###########################################################################
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_ufunc_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
from pythran.typing import NDArray


@TestEnv.module
class TestNumpyUFuncBinary(TestEnv):
pass

Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_numpy_ufunc_unary.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
scipy = None


@TestEnv.module
class TestNumpyUFuncUnary(TestEnv):
pass

Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_operator.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from pythran.typing import List


@TestEnv.module
class TestOperator(TestEnv):

def test_lt(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_os.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from pythran.tests import TestEnv


@TestEnv.module
class TestOs(TestEnv):

def test_os_path(self):
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_random.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import sys


@TestEnv.module
class TestRandom(TestEnv):

"""
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_scipy.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,6 @@ class TestScikitImage(TestFromDir):

if not platform.machine().startswith('ppc64'):

@TestEnv.module
class TestScipySpecial(TestEnv):
def test_jv_scalar(self):
self.run_test("""
Expand Down
1 change: 0 additions & 1 deletion pythran/tests/test_time.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from pythran.tests import TestEnv


@TestEnv.module
class TestTime(TestEnv):

""" Tests for the time module. """
Expand Down

0 comments on commit 22c90ab

Please sign in to comment.