conda-forge / conda-forge-webservices

the heroku app deployed to run conda-forge admin commands and linting

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

`Test_comment_on_pr.test_comment_same_as_before` failing on `main`

jakirkham opened this issue · comments

Seeing the following error on CI for main:

________________ Test_comment_on_pr.test_comment_same_as_before ________________

self = <conda_forge_webservices.tests.linting.test_comment_on_pr.Test_comment_on_pr testMethod=test_comment_same_as_before>

    def test_comment_same_as_before(self):
        PR_number = 523
        message_to_post = ("Testing that a message isn't re-posted if it \n"
                           "was the same as before. ```{}```"
                           "".format(random.randint(100000, 200000)))
        for _ in range(2):
            comment_on_pr('conda-forge', 'conda-forge-webservices', PR_number,
                          message_to_post)
    
        gh = github.Github(os.environ['GH_TOKEN'])
        linting_repo = gh.get_user('conda-forge').get_repo('conda-forge-webservices')
        pr = linting_repo.get_issue(PR_number)
        comments = list(pr.get_comments())
    
        if len(comments) > 1:
            self.assertNotEqual(comments[-1].body, comments[-2].body)
    
>       self.assertMultiLineEqual(comments[-1].body, message_to_post)
E       AssertionError: "Test[17 chars]e isn't re-posted if it \nwas the same as before. ```126196```" != "Test[17 chars]e isn't re-posted if it \nwas the same as before. ```115242```"
E         Testing that a message isn't re-posted if it 
E       - was the same as before. ```126196```?                              ^^^^
E       + was the same as before. ```115242```?                             ++ ^^

conda_forge_webservices/tests/linting/test_comment_on_pr.py:30: AssertionError

Rerunning CI to see if this is persistent

Rerunning fixed the issue. So maybe this was a fluke?