-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a framework of functional tests for configuration files #5287
Create a framework of functional tests for configuration files #5287
Conversation
Pull Request Test Coverage Report for Build 1454620578
💛 - Coveralls |
c82225f
to
bf7f703
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work! I think the functional_append
and functional_remove
and not the easiest to understand for new contributors, but they probably also shouldn't need to mess with it too much.
Left some comments here and there but in general this seems quite polished!
0117951
to
6b73b8e
Compare
086766c
to
1f615a8
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be good to go review again 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Minor comments here and there.
Should we also test a pylintrc
without any extension in this test framework?
tests/config/functional/toml/issue_4746/loaded_plugin_does_not_exists.toml
Outdated
Show resolved
Hide resolved
Pylintrc is an ini file, I think the file name itself does not matter a lot. (The 'find the conf file' logic is handled elsewhere) |
Also migrate three standard unittest to the new framework for testing.
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
This permits to introduce an example of configuration file with an error.
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
3895bd8
to
10135bb
Compare
Co-authored-by: Daniël van Noord <13665637+DanielNoord@users.noreply.github.com>
@Pierre-Sassoulas Did you test this with |
No I'm using only pytest but I thought github action used tox. Let me check. |
See #5301 |
@@ -271,6 +271,7 @@ def read_config_file(self, config_file=None, verbose=None): | |||
|
|||
use_config_file = config_file and os.path.exists(config_file) | |||
if use_config_file: | |||
self.set_current_module(config_file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Pierre-Sassoulas Why is this necessary? Does this add anything other than allowing the test framework to function?
Ran into this while working on argparse
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's setting the file that the add_message
will display if we add a message later. I.E. [relpath}:1:0: E0013:
later.
Type of Changes
Description
This create a framework for configuration testing. Also migrate three standard unittest to the new framework for testing. Done to help with #4720.