Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
bubenkoff committed Jun 3, 2018
1 parent 32e6ba9 commit de1009b
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 11 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -49,3 +49,4 @@ tests.*
/include
/src
/.env
/.pytest_cache
6 changes: 3 additions & 3 deletions .travis.yml
@@ -1,12 +1,12 @@
sudo: false
language: python
python: "3.4"
python: "3.6"
addons:
firefox: "37.0.1"
before_install:
- "export DISPLAY=:99.0"
- "sh -e /etc/init.d/xvfb start"
- "npm install -g selenium-standalone@4.5.3"
- "npm install -g selenium-standalone@6.15.0"
- "selenium-standalone install"
- "selenium-standalone start &"
env:
Expand All @@ -15,7 +15,7 @@ env:
- TESTENV=py27
- TESTENV=py27-xdist
- TESTENV=py27-pytest-latest
- TESTENV=py34
- TESTENV=py36
- TESTENV=coveralls
install:
- pip install tox
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -7,7 +7,7 @@ PATH := .env/bin:$(PATH)
# install all needed for development
develop: .env
pip install -e . -r requirements-testing.txt tox coveralls
npm install selenium-standalone
npm install selenium-standalone@6.15.0
node_modules/.bin/selenium-standalone install

coverage: develop
Expand Down
8 changes: 4 additions & 4 deletions pytest_splinter/plugin.py
Expand Up @@ -99,7 +99,7 @@ def splinter_remote_url(request):

@pytest.fixture(scope='session') # pragma: no cover
def splinter_selenium_socket_timeout(request):
"""Internal Selenium socket timeout (communication between webdriver and the browser).
"""Return internal Selenium socket timeout (communication between webdriver and the browser).
:return: Seconds.
"""
Expand All @@ -108,7 +108,7 @@ def splinter_selenium_socket_timeout(request):

@pytest.fixture(scope='session') # pragma: no cover
def splinter_selenium_implicit_wait(request):
"""Selenium implicit wait timeout.
"""Return Selenium implicit wait timeout.
:return: Seconds.
"""
Expand All @@ -135,7 +135,7 @@ def splinter_selenium_speed(request):

@pytest.fixture(scope='session') # pragma: no cover
def splinter_browser_load_condition():
"""The condition that has to be `True` to assume that the page is fully loaded.
"""Return the condition that has to be `True` to assume that the page is fully loaded.
One example is to wait for jQuery, then the condition could be::
Expand All @@ -152,7 +152,7 @@ def condition(browser):

@pytest.fixture(scope='session') # pragma: no cover
def splinter_browser_load_timeout():
"""The timeout in seconds in which the page is expected to be fully loaded."""
"""Return the timeout in seconds in which the page is expected to be fully loaded."""
return 10


Expand Down
2 changes: 1 addition & 1 deletion setup.py
Expand Up @@ -42,7 +42,7 @@
'Topic :: Utilities',
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 3',
] + [('Programming Language :: Python :: %s' % x) for x in '2.7 3.0 3.1 3.2 3.3 3.4 3.5'.split()],
] + [('Programming Language :: Python :: %s' % x) for x in '2.7 3.0 3.1 3.2 3.3 3.4 3.5 3.6'.split()],
tests_require=['tox'],
entry_points={'pytest11': [
'pytest-splinter=pytest_splinter.plugin',
Expand Down
4 changes: 2 additions & 2 deletions tests/test_plugin.py
Expand Up @@ -11,7 +11,7 @@

@pytest.fixture
def simple_page_content():
"""Simple page content."""
"""Return simple page content."""
return """<html xmlns="http://www.w3.org/1999/xhtml"><head></head>
<body>
<div id="content">
Expand All @@ -26,7 +26,7 @@ def simple_page_content():

@pytest.fixture
def simple_page(httpserver, browser, simple_page_content):
"""Simple served html page."""
"""Serve simple html page."""
httpserver.serve_content(
simple_page_content, code=200, headers={'Content-Type': 'text/html'})
browser.visit(httpserver.url)
Expand Down

0 comments on commit de1009b

Please sign in to comment.