blob: 5249b7e02405c52fdb19fb2c3f87db1673691901 [file]
import pytest
@pytest.mark.parametrize("test_input,expected", [
("3+5", 8),
("2+4", 6),
])
@pytest.mark.parametrize("x", [0, 1])
@pytest.mark.parametrize("y", [2, 3])
def test_returns_correct_result(test_input, expected, x, y): # False positive: unused parameters
y.bit_length() #
x.bit_length() #
test_input.__len__() #
expected.bit_length() #
@pytest.mark.parametrize(('x', 'y'), [(1, 2, 3, 4)]) # Too many values in tuple, should be 2
def test_wrong_number_of_parameters(x, y):
x.bit_length() #
@pytest.mark.parametrize("y", ['2', 3])
def test_foo(y):
y.bit_length() #
y.__xor__( )#
@pytest.mark.parametrize("y", 3)
def test_int_foo(y):
y.__xor__( )#
@pytest.mark.parametrize