def get_testpath(testspec):
    """Return the path to the test module separated from
    the rest of the test spec.
    """
    testspec = testspec.strip()
    parts = testspec.split(':')
    if len(parts) > 1 and parts[1].startswith('\\'):  # windows abs path
        path = ':'.join(parts[:2])
        if len(parts) == 3:
            rest = parts[2]
        else:
            rest = ''
    else:
        path, _, rest = testspec.partition(':')
    return path, rest