|
21 | 21 | )
|
22 | 22 |
|
23 | 23 |
|
24 |
| -@pytest.mark.parametrize("x", [ |
25 |
| - "win", |
26 |
| - "not unix", |
27 |
| - 'cuda_compiler_version == "None"', |
28 |
| - "build_platform != target_platform", |
29 |
| -]) |
| 24 | +@pytest.mark.parametrize( |
| 25 | + "x", |
| 26 | + [ |
| 27 | + "win", |
| 28 | + "not unix", |
| 29 | + 'cuda_compiler_version == "None"', |
| 30 | + "build_platform != target_platform", |
| 31 | + ], |
| 32 | +) |
30 | 33 | def test_is_single_expression(x):
|
31 | 34 | assert is_single_expression(x)
|
32 | 35 |
|
33 | 36 |
|
34 |
| -@pytest.mark.parametrize("x", [ |
35 |
| - 'cuda_compiler_version != "None" and linux"', |
36 |
| - 'unix and blas_impl != "mkl"', |
37 |
| - "linux or osx", |
38 |
| - "foo if bar else baz", |
39 |
| -]) |
| 37 | +@pytest.mark.parametrize( |
| 38 | + "x", |
| 39 | + [ |
| 40 | + 'cuda_compiler_version != "None" and linux"', |
| 41 | + 'unix and blas_impl != "mkl"', |
| 42 | + "linux or osx", |
| 43 | + "foo if bar else baz", |
| 44 | + ], |
| 45 | +) |
40 | 46 | def test_not_is_single_expression(x):
|
41 | 47 | assert not is_single_expression(x)
|
42 | 48 |
|
43 | 49 |
|
44 |
| -@pytest.mark.parametrize("a,b", [ |
45 |
| - ("unix", "not unix"), |
46 |
| - ('cuda_compiler_version == "None"', 'not cuda_compiler_version == "None"'), |
47 |
| - ('cuda_compiler_version == "None"', 'cuda_compiler_version != "None"'), |
48 |
| - ('not cuda_compiler_version == "None"', 'not cuda_compiler_version != "None"'), |
49 |
| -]) |
| 50 | +@pytest.mark.parametrize( |
| 51 | + "a,b", |
| 52 | + [ |
| 53 | + ("unix", "not unix"), |
| 54 | + ('cuda_compiler_version == "None"', 'not cuda_compiler_version == "None"'), |
| 55 | + ('cuda_compiler_version == "None"', 'cuda_compiler_version != "None"'), |
| 56 | + ('not cuda_compiler_version == "None"', 'not cuda_compiler_version != "None"'), |
| 57 | + ], |
| 58 | +) |
50 | 59 | def test_is_negated_condition(a, b):
|
51 | 60 | assert is_negated_condition(a, b)
|
52 | 61 | assert is_negated_condition(b, a)
|
53 | 62 |
|
54 | 63 |
|
55 |
| -@pytest.mark.parametrize("a,b", [ |
56 |
| - ("not unix", "not unix"), |
57 |
| - ('cuda_compiler_version == "None"', 'not cuda_compiler_version != "None"'), |
58 |
| - ('cuda_compiler_version != "None"', 'not cuda_compiler_version == "None"'), |
59 |
| - ("a or b", "not a or b"), |
60 |
| - ("a and b", "not a and b"), |
61 |
| -]) |
| 64 | +@pytest.mark.parametrize( |
| 65 | + "a,b", |
| 66 | + [ |
| 67 | + ("not unix", "not unix"), |
| 68 | + ('cuda_compiler_version == "None"', 'not cuda_compiler_version != "None"'), |
| 69 | + ('cuda_compiler_version != "None"', 'not cuda_compiler_version == "None"'), |
| 70 | + ("a or b", "not a or b"), |
| 71 | + ("a and b", "not a and b"), |
| 72 | + ], |
| 73 | +) |
62 | 74 | def test_not_is_negated_condition(a, b):
|
63 | 75 | assert not is_negated_condition(a, b)
|
64 | 76 | assert not is_negated_condition(b, a)
|
|
0 commit comments