def test_self_glob_when_files_dont_match(self):
     glob.populate(Sequence.create("1-20").expand("/other/file.####.exr"))
     d = DependencyList()
     file = "/some/file.*.exr"
     d.add(file, must_exist=False)
     d.glob()
     self.assertEqual(len(d), 0)
 def test_self_glob_dedups_when_many_files_match(self):
     glob.populate(Sequence.create("1-20").expand("/some/file.####.exr"))
     d = DependencyList()
     files = ["/some/file.*.exr", "/some/*.exr"]
     d.add(*files, must_exist=False)
     d.glob()
     self.assertEqual(len(d), 20)
def collect(obj):
    """Collect all upload files.

    Always add any extra uploads the user has chosen. Then do a scan if
    the policy is not none.
    """

    policy = obj.get_attribute("dependency_scan_policy").get_long()

    result = DependencyList()

    result.add(
        "$CONDUCTOR_LOCATION/conductor/clarisse/bin/ct_cnode",
        must_exist=True)

    result.add(*_get_extra_uploads(obj), must_exist=True)

    result.add(*get_scan(obj, policy), must_exist=False)

    # tell the list to expand  any "*" or <UDIM> in place
    result.glob()
    return result