From dcc827f3e32a9baf312182835ad04b0ec76c2ced Mon Sep 17 00:00:00 2001 From: Joshua Fehler Date: Mon, 10 Jun 2024 14:30:53 -0400 Subject: [PATCH] Put splinter core tests into an isolated directory --- tests/{ => tests_splinter}/test_browser.py | 0 tests/{ => tests_splinter}/test_element_list.py | 6 +++--- tests/{ => tests_splinter}/test_request_handler.py | 0 tests/{ => tests_splinter}/test_xpath_concat.py | 0 tox.ini | 2 +- 5 files changed, 4 insertions(+), 4 deletions(-) rename tests/{ => tests_splinter}/test_browser.py (100%) rename tests/{ => tests_splinter}/test_element_list.py (94%) rename tests/{ => tests_splinter}/test_request_handler.py (100%) rename tests/{ => tests_splinter}/test_xpath_concat.py (100%) diff --git a/tests/test_browser.py b/tests/tests_splinter/test_browser.py similarity index 100% rename from tests/test_browser.py rename to tests/tests_splinter/test_browser.py diff --git a/tests/test_element_list.py b/tests/tests_splinter/test_element_list.py similarity index 94% rename from tests/test_element_list.py rename to tests/tests_splinter/test_element_list.py index 47956287f..1ee48d0df 100644 --- a/tests/test_element_list.py +++ b/tests/tests_splinter/test_element_list.py @@ -53,13 +53,13 @@ def test_call_method_on_first_element(): def test_raise_exception_on_indexerror(): - "should raise ElementDoesNotExist exception on IndexError" + """should raise ElementDoesNotExist exception on IndexError""" with pytest.raises(ElementDoesNotExist): ElementList([]).first def test_raise_exception_on_indexerror_with_unicode_query(): - "should raise ElementDoesNotExist exception on IndexError" + """should raise ElementDoesNotExist exception on IndexError""" with pytest.raises(ElementDoesNotExist): ElementList([], query=".element[title=título]").first @@ -85,7 +85,7 @@ def test_attribute_error_method_for_empty(): def test_attribute_error_content(): - "should raise AttributeError with right content" + """should raise AttributeError with right content""" with pytest.raises(AttributeError) as e: the_list = ElementList([Person(), Person()]) the_list.talk() diff --git a/tests/test_request_handler.py b/tests/tests_splinter/test_request_handler.py similarity index 100% rename from tests/test_request_handler.py rename to tests/tests_splinter/test_request_handler.py diff --git a/tests/test_xpath_concat.py b/tests/tests_splinter/test_xpath_concat.py similarity index 100% rename from tests/test_xpath_concat.py rename to tests/tests_splinter/test_xpath_concat.py diff --git a/tox.ini b/tox.ini index 7e378974e..04be4dca7 100644 --- a/tox.ini +++ b/tox.ini @@ -2,7 +2,7 @@ extras = zope.testbrowser, django, flask deps = -rrequirements/test.txt commands = - pytest --ignore-flaky -v {posargs} tests/test_browser.py tests/test_element_list.py tests/test_request_handler.py tests/test_xpath_concat.py + pytest --ignore-flaky -v {posargs} tests/splinter_core [testenv:tests_lxml_drivers] extras = zope.testbrowser, django, flask