Skip to content

Commit

Permalink
Remove import and rename file to use pytest's conftest.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre-Sassoulas committed Apr 20, 2020
1 parent 1d4a09b commit 67d0572
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 18 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Licensed under the GPL: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
# For details: https://github.com/PyCQA/pylint/blob/master/COPYING
# pylint: disable=redefined-outer-name


import pytest

Expand All @@ -24,7 +26,7 @@ def empty_store():

@pytest.fixture
def store():
store = MessageDefinitionStore()
store_ = MessageDefinitionStore()

class Checker(BaseChecker):
name = "achecker"
Expand All @@ -43,8 +45,8 @@ class Checker(BaseChecker):
),
}

store.register_messages_from_checker(Checker())
return store
store_.register_messages_from_checker(Checker())
return store_


@pytest.fixture
Expand Down
5 changes: 0 additions & 5 deletions tests/message/unittest_message.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@

from pylint.message import Message

from .generic_fixtures import ( # pylint: disable=unused-import
message_definitions,
store,
)


def test_new_message(message_definitions):
def build_message(message_definition, location_value):
Expand Down
2 changes: 0 additions & 2 deletions tests/message/unittest_message_definition_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,6 @@
from pylint.exceptions import InvalidMessageError, UnknownMessageError
from pylint.message import MessageDefinition

from .generic_fixtures import empty_store, store # pylint: disable=unused-import


@pytest.mark.parametrize(
"messages,expected",
Expand Down
8 changes: 0 additions & 8 deletions tests/message/unittest_message_id_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,6 @@

from pylint.exceptions import InvalidMessageError, UnknownMessageError

from .generic_fixtures import ( # pylint: disable=unused-import
empty_msgid_store,
message_definitions,
msgid_store,
msgids,
store,
)


def test_len_str(msgid_store, msgids):
assert len(msgid_store) == len(msgids)
Expand Down

0 comments on commit 67d0572

Please sign in to comment.