pylint icon indicating copy to clipboard operation
pylint copied to clipboard

functional tests: fix automatic ref updating

Open sshane opened this issue 1 year ago • 5 comments

Type of Changes

Type
:bug: Bug fix

Description

Allows automatic test ref updating to function properly.

Closes https://github.com/pylint-dev/pylint/issues/9688

sshane avatar Jun 04 '24 07:06 sshane

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 77933ce2c674abaeaefb29d7401c55d549496836

github-actions[bot] avatar Jun 04 '24 07:06 github-actions[bot]

Looks like it was asserting the previously-first assert's message?

sshane avatar Jun 04 '24 08:06 sshane

I reverted the change to the output of LintModuleTest and made it update the output file after a failed test. I think the real solution is refactoring this test such that it isn't testing for two things/split it up. That way testutil can test for both assertion cases, but I probably don't have time for that anytime soon.

sshane avatar Jun 04 '24 08:06 sshane

🤖 According to the primer, this change has no effect on the checked open source code. 🤖🎉

This comment was generated for commit 63cbd3e7debd0fc5c0020abd36b53d9a74008f64

github-actions[bot] avatar Jun 04 '24 08:06 github-actions[bot]

I think the first commit / intention revealed an issue with the functional test : upgrading the expected output before checking the message raised or not should not make the tests fail. Maybe the expected output generation is wrong.

I think the real solution is refactoring this test such that it isn't testing for two things/split it up. That way testutil can test for both assertion cases, but I probably don't have time for that anytime soon.

Yeah, I agree, those monster classes can use composition and two sub classes anytime (and tested with more ease as a result). Not sure this is strictly necessary to fix the issue you unearthed though.

I probably don't have time for that anytime soon.

No worries, thank you for bringing the issue to our attention 😄

Pierre-Sassoulas avatar Jun 04 '24 20:06 Pierre-Sassoulas