def test_safe_glob_multi_glob(mock_glob): # Arrange mock_glob.return_value = ["glob_results.py", "more_results.py"] # Act match, result = safe_glob("*.py") # Assert assert match == True assert result == ["glob_results.py", "more_results.py"]
def test_safe_glob_non_matching_glob(mock_glob): # Arrange mock_glob.return_value = [] # Act match, result = safe_glob("*.py") # Assert assert match == False assert result == ["*.py"]
def test_safe_glob_multi_glob(mock_glob): # Arrange mock_glob.return_value = ['glob_results.py', 'more_results.py'] # Act match, result = safe_glob('*.py') # Assert assert match == True assert result == ['glob_results.py', 'more_results.py']