Пример #1
0
    def test_version_check_fails_when_available(
        assert_github_issue_no_cache: AssertGitHubIssue, ):
        with pytest.raises(AssertionError,
                           match="Release '2\\.0\\.0' of") as ex:
            assert_github_issue_no_cache.fixed_in(
                "2.0.0", pattern="releases/(?P<version>.*)")

        print(ex)  # for quick grab of string for documentation
Пример #2
0
def assert_github_issue_caching():
    assert_github_issue = AssertGitHubIssue(REPOSITORY_ID)

    # first call can be cache miss
    assert_github_issue.is_closed(CLOSED_ISSUE_NUMBER)
    try:
        assert_github_issue.current_release(0)
    except AssertionError:
        pass

    assert_github_issue.fixed_in("1234567890.0.0", "releases/(?P<version>.*)")

    return assert_github_issue
Пример #3
0
 def test_version_check_fails_when_available(assert_github_issue_caching: AssertGitHubIssue):
     with _timer():
         with pytest.raises(AssertionError):
             assert_github_issue_caching.fixed_in("1.0.0", pattern="releases/(?P<version>.*)")