feat: add 2 tests based on good/bad plot from upstream issue#2
feat: add 2 tests based on good/bad plot from upstream issue#2haval0 merged 2 commits intoissue/24092from
Conversation
The test cases are based on the demonstration of the issue in upstream issue matplotlib#24092 The test case for bad plot (test_tick_values_not_empty) should fail until we implement our fix. The test case for good plot (test_tick_values_correct) should already suceed and continue to succeed after we implement our fix.
|
Currently, the second test case, which represents the "bad plot" case from the upstream issue, mysteriously passes perfectly (even though we have not yet fixed the bug!). The code in the test is logically exactly the same as this file, which is the code from the upstream issue to reproduce the bug. The linked python file successfully reproduces the bug, and yields an empty |
|
Output showing that the test passes: |
"classic_mode" had to be disabled for the test to successfully replicate the normal behavior of matplotlib. Now the test produces an empty list, which is what should be fixed.
|
Tests now go as expected after setting "classic_mode" to false in the "bad plot" test. |
|
With the simple fix of commenting out the Would need to look into requirements to see if the test is wrong or if the simple fix gives the wrong result |
|
Both tests pass after stride calculation behavior revert in #3 . Should prevent any similar regressions in the future. |
The test cases are based on the demonstration of the issue in upstream issue matplotlib#24092
The test case for bad plot (test_tick_values_not_empty) should fail until we implement our fix.
The test case for good plot (test_tick_values_correct) should already succeed and continue to succeed after we implement our fix.