diff options
author | Daniƫl van Noord <13665637+DanielNoord@users.noreply.github.com> | 2022-05-10 10:41:49 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-10 10:41:49 +0200 |
commit | 0199504334bf1313854bdbc42f6982484f77cbbd (patch) | |
tree | 54826be7d4b846eebcccba3a55fee52a3140dc00 /tests | |
parent | bc2fedcedce33f3fab054ea872b8c73aacd9934f (diff) | |
download | pylint-git-0199504334bf1313854bdbc42f6982484f77cbbd.tar.gz |
Make sure that --generate-rcfile generates a valid file (#6566)
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_self.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/test_self.py b/tests/test_self.py index 797959e11..813a1dbac 100644 --- a/tests/test_self.py +++ b/tests/test_self.py @@ -1345,6 +1345,17 @@ class TestCallbackOptions: ) assert process.stdout == process_two.stdout + # Check that the generated file is valid + with tempfile.NamedTemporaryFile(mode="w", delete=False) as temp: + filename = temp.name + temp.write(process.stdout) + runner = Run( + [join(HERE, "regrtest_data", "empty.py"), f"--rcfile={filename}"], + exit=False, + ) + assert not runner.linter.msg_status + os.remove(filename) + @staticmethod def test_generate_config_disable_symbolic_names() -> None: """Test that --generate-rcfile puts symbolic names in the --disable option.""" |