Commit 30863c01 by Arun Babu Neelicattu

tests: rename test application to avoid collection

Pytest issues a warning as it attempts to collect `TestApplication`.
This change renames the class to `PoetryTestApplication`.
parent 46ea187a
...@@ -10,7 +10,7 @@ from cleo.testers.command_tester import CommandTester ...@@ -10,7 +10,7 @@ from cleo.testers.command_tester import CommandTester
from poetry.repositories import Pool from poetry.repositories import Pool
from poetry.utils._compat import decode from poetry.utils._compat import decode
from tests.helpers import TestApplication from tests.helpers import PoetryTestApplication
from tests.helpers import get_package from tests.helpers import get_package
...@@ -36,7 +36,7 @@ def patches(mocker, source_dir, repo): ...@@ -36,7 +36,7 @@ def patches(mocker, source_dir, repo):
@pytest.fixture @pytest.fixture
def tester(patches): def tester(patches):
# we need a test application without poetry here. # we need a test application without poetry here.
app = TestApplication(None) app = PoetryTestApplication(None)
return CommandTester(app.find("init")) return CommandTester(app.find("init"))
......
...@@ -11,7 +11,7 @@ from poetry.factory import Factory ...@@ -11,7 +11,7 @@ from poetry.factory import Factory
from poetry.installation.noop_installer import NoopInstaller from poetry.installation.noop_installer import NoopInstaller
from poetry.repositories import Pool from poetry.repositories import Pool
from poetry.utils.env import MockEnv from poetry.utils.env import MockEnv
from tests.helpers import TestApplication from tests.helpers import PoetryTestApplication
from tests.helpers import TestExecutor from tests.helpers import TestExecutor
from tests.helpers import TestLocker from tests.helpers import TestLocker
from tests.helpers import mock_clone from tests.helpers import mock_clone
...@@ -97,7 +97,7 @@ def poetry(repo, project_directory, config): ...@@ -97,7 +97,7 @@ def poetry(repo, project_directory, config):
@pytest.fixture @pytest.fixture
def app(poetry): def app(poetry):
app_ = TestApplication(poetry) app_ = PoetryTestApplication(poetry)
return app_ return app_
......
...@@ -132,9 +132,9 @@ class TestExecutor(Executor): ...@@ -132,9 +132,9 @@ class TestExecutor(Executor):
return 0 return 0
class TestApplication(Application): class PoetryTestApplication(Application):
def __init__(self, poetry): def __init__(self, poetry):
super(TestApplication, self).__init__() super(PoetryTestApplication, self).__init__()
self._poetry = poetry self._poetry = poetry
def reset_poetry(self): def reset_poetry(self):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment