def test_exclude_entry_returns_False_if_exlcude_parameters_are_in_input(x): s = ''.join(map(py23_str, x)) assume( any( int(i) in (23, 45, 87) for i in re.findall(r'\d+', s) if re.match(r'\d+$', i))) assert not exclude_entry(s, [23, 45, 87], int, re.compile(r'\d+'))
def test_exclude_entry_returns_False_if_exlcude_parameters_are_in_input(x): s = ''.join(map(py23_str, x)) assume(any(int(i) in (23, 45, 87) for i in re.findall(r'\d+', s) if re.match(r'\d+$', i))) assert not exclude_entry(s, [23, 45, 87], int, re.compile(r'\d+'))
def test_exclude_entry_returns_False_if_exlcude_parameters_are_in_input_example(): assert not exclude_entry('a56b23c89', [23], int, re.compile(r'\d+'))
def test_exclude_entry_returns_True_if_exlcude_parameters_are_not_in_input_example(): assert exclude_entry('a56b23c89', [100, 45], int, re.compile(r'\d+'))
def test_exclude_entry_returns_False_if_exlcude_parameters_are_in_input_example( ): assert not exclude_entry('a56b23c89', [23], int, re.compile(r'\d+'))
def test_exclude_entry_returns_True_if_exlcude_parameters_are_not_in_input_example( ): assert exclude_entry('a56b23c89', [100, 45], int, re.compile(r'\d+'))
def test_exclude_entry(): # Check if the exclude value is present in the input string regex = re.compile(r'\d+') assert exclude_entry('a56b23c89', [100, 45], int, regex) assert not exclude_entry('a56b23c89', [23], int, regex)