-
Notifications
You must be signed in to change notification settings - Fork 48
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] Fix incorrect PR comment generation (#540)
* Add test for variant output files in PR comment Add a test that the info used to generate a PR comment handles variant output files correctly. Regression tests that output one of the allowed variants of the output file should be treated as correct in addition to tests that output the original version of the output file. * Refactor getting PR comment info into new function Refactor the code for getting the info about a test run for use in a PR comment into a separate function. This makes this function easier to test instead of testing the entire process of creating a PR comment at the same time. * Fix variant output file handling in PR comments Currently, when generating stats and a list of failed tests for PR comments, tests are only marked as passed if they exactly matched the original output file. This commit changes that by also treating a regression test as passed if it is an acceptable variant of the output file. * Add test for invalid variant hash Add another test to make sure that the change in 4e78b55 didn't accidentally cause the PR comment handling to mark all tests as passing even if they result in an invalid variant file. * Rename get_info_about_test_for_pr_comment nosetests appears to be treating get_info_about_test_for_pr_comment as a test to run because it has 'test' in the name. That causes the test suite to fail because it doesn't pass in the required argument. This renames the function so that nosetests realizes that it shouldn't treat it as a test. * Move dataclasses to models.py Move dataclasses used for representing info about PR comments to models.py so that all classes for storing data are placed together. Co-authored-by: Willem <[email protected]> Co-authored-by: Shivam Kumar Jha <[email protected]>
- Loading branch information
1 parent
7809700
commit 7fcb343
Showing
3 changed files
with
113 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters