def test_has_prefix(): files_with_prefix = [("prefix/path", "text", "short/path/1"), ("prefix/path", "text", "short/path/2")] assert build.has_prefix("short/path/1", files_with_prefix) == ("prefix/path", "text") assert build.has_prefix("short/path/nope", files_with_prefix) == (None, None)