def test_when_dir_and__init__file_exists_(isfile, isdir): isdir.return_value = True isfile.return_value = True assert is_package('/home/src/tea') isdir.assert_called_with('/home/src/tea') isfile.assert_called_with('/home/src/tea/__init__.py')
def test_when_dir_dont_exist(isdir): isdir.return_value = False assert not is_package('/home/src/tea') isdir.assert_called_with('/home/src/tea')