def have_version_regexp(context, version1, version2): context.version1 = re.compile(version1) context.version2 = versionah.Version(version2)
def g_have_version_string(context, version1, version2): context.version1 = versionah.split_version(version1) context.version2 = versionah.Version(version2)
def g_have_version_list(context, version1, version2): context.version1 = list(versionah.split_version(version1)) context.version2 = versionah.Version(version2)
def g_have_name_version(context, name, version): context.version = versionah.Version(version, name)
def g_have_version(context, version): context.version = versionah.Version(version)
def g_have_version_date(context, version, date): y, m, d = map(int, date.split("-")) context.version = versionah.Version(version, date=datetime.date(y, m, d))
def g_invalid_version(context, string): try: context.response = versionah.Version(string) except Exception as e: context.exception = e
def g_have_versions(context, version1, version2): context.version1 = versionah.Version(version1) context.version2 = versionah.Version(version2)