@@ -8,6 +8,14 @@ from pylint import checkers
 from pylint.lint import PyLinter
 from pylint.testutils import MinimalTestReporter
 
+TOP = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
+PYLINTRC = os.path.join(TOP, "pylintrc")
+
+
+@pytest.fixture(autouse=True)
+def pylintrc():
+    os.environ["PYLINTRC"] = PYLINTRC
+
 
 @pytest.fixture
 def linter(checker, register, enable, disable, reporter):
# pylint: disable=redefined-outer-name
# pylint: disable=no-name-in-module
import os

import pytest

from pylint import checkers
from pylint.lint import PyLinter
from pylint.testutils import MinimalTestReporter


@pytest.fixture
def linter(checker, register, enable, disable, reporter):
    _linter = PyLinter()
    _linter.set_reporter(reporter())
    checkers.initialize(_linter)
    if register:
        register(_linter)
    if checker:
        _linter.register_checker(checker(_linter))
    if disable:
        for msg in disable:
            _linter.disable(msg)
    if enable:
        for msg in enable:
            _linter.enable(msg)
    os.environ.pop("PYLINTRC", None)
    return _linter


@pytest.fixture(scope="module")
def checker():
    return None


@pytest.fixture(scope="module")
def register():
    return None


@pytest.fixture(scope="module")
def enable():
    return None


@pytest.fixture(scope="module")
def disable():
    return None


@pytest.fixture(scope="module")
def reporter():
    return MinimalTestReporter

I don't see the point in adding those lines. Can you explain a little bit please?