Beispiel #1
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
Beispiel #2
0
 def test_closed_issue_check_does_not_fail_when_closed(
     assert_github_issue_no_cache: AssertGitHubIssue, ):
     assert_github_issue_no_cache.is_closed(CLOSED_ISSUE_NUMBER)
Beispiel #3
0
 def test_closed_issue_check_fails_when_open(
     assert_github_issue_no_cache: AssertGitHubIssue, ):
     with pytest.raises(AssertionError):
         assert_github_issue_no_cache.is_closed(OPEN_ISSUE_NUMBER)
Beispiel #4
0
 def test_closed_issue_check_does_not_fail_when_closed(assert_github_issue_caching: AssertGitHubIssue):
     with _timer():
         assert_github_issue_caching.is_closed(CLOSED_ISSUE_NUMBER)