From 0303c9d67d423dac218eea460a6d75bdf865c279 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Tue, 16 Feb 2016 15:35:13 -0500 Subject: [PATCH 1/4] Clean up imports --- conftest.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/conftest.py b/conftest.py index 1ba688d0c56..27bfcf5bc02 100755 --- a/conftest.py +++ b/conftest.py @@ -1,9 +1,9 @@ """ This is the pytest configuration file """ +import optparse import os import shutil import time -from optparse import SUPPRESS_HELP from seleniumbase.config import settings from seleniumbase.fixtures import constants @@ -43,7 +43,7 @@ def pytest_addoption(parser): dest='database_env', choices=('prod', 'qa', 'test'), default='test', - help=SUPPRESS_HELP) + help=optparse.SUPPRESS_HELP) parser.addoption('--with-s3_logging', action="store_true", dest='with_s3_logging', default=False, From 5edba1b4060634d5f9e558ee4201497e7378d5bd Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Tue, 16 Feb 2016 15:36:32 -0500 Subject: [PATCH 2/4] Remove unneeded code --- conftest.py | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) diff --git a/conftest.py b/conftest.py index 27bfcf5bc02..090a84b0c0a 100755 --- a/conftest.py +++ b/conftest.py @@ -77,55 +77,12 @@ def pytest_addoption(parser): def pytest_configure(config): - with_selenium = config.getoption('with_selenium') - with_testing_base = config.getoption('with_testing_base') - with_db_reporting = config.getoption('with_db_reporting') - with_s3_logging = config.getoption('with_s3_logging') - with_screen_shots = config.getoption('with_screen_shots') - with_basic_test_info = config.getoption('with_basic_test_info') - with_page_source = config.getoption('with_page_source') - database_env = config.getoption('database_env') - browser = config.getoption('browser') - log_path = config.getoption('log_path') - headless = config.getoption('headless') - demo_mode = config.getoption('demo_mode') - demo_sleep = '' - data = '' - if config.getoption('demo_sleep') is not None: - demo_sleep = config.getoption('demo_sleep') - if config.getoption('data') is not None: - data = config.getoption('data') - if config.getoption('database_env') is not None: - database_env = config.getoption('database_env') - # Create a temporary config file while tests are running - pytest_config = '.pytest_config' - config_file = open(pytest_config, 'w+') - config_file.write("with_selenium:::%s\n" % with_selenium) - config_file.write("browser:::%s\n" % browser) - config_file.write("data:::%s\n" % data) - config_file.write("with_testing_base:::%s\n" % with_testing_base) - config_file.write("with_db_reporting:::%s\n" % with_db_reporting) - config_file.write("with_s3_logging:::%s\n" % with_s3_logging) - config_file.write("with_screen_shots:::%s\n" % with_screen_shots) - config_file.write("with_basic_test_info:::%s\n" % with_basic_test_info) - config_file.write("with_page_source:::%s\n" % with_page_source) - config_file.write("database_env:::%s\n" % database_env) - config_file.write("log_path:::%s\n" % log_path) - config_file.write("headless:::%s\n" % headless) - config_file.write("demo_mode:::%s\n" % demo_mode) - config_file.write("demo_sleep:::%s\n" % demo_sleep) - config_file.close() + """ This runs after command line options have been parsed """ log_folder_setup(config) -def pytest_unconfigure(): - pytest_config = '.pytest_config' - if os.path.isfile(pytest_config): - os.remove(pytest_config) - - def log_folder_setup(config): - # Handle Logging + """ Handle Logging """ with_testing_base = config.getoption('with_testing_base') if with_testing_base: log_path = config.getoption('log_path') From 7e9c53448d393d3d3d2cc15e46c898fcd94711fd Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Tue, 16 Feb 2016 15:37:08 -0500 Subject: [PATCH 3/4] Comments update --- conftest.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/conftest.py b/conftest.py index 090a84b0c0a..12c910f5c7a 100755 --- a/conftest.py +++ b/conftest.py @@ -101,11 +101,16 @@ def log_folder_setup(config): shutil.rmtree(archived_logs) +def pytest_unconfigure(): + """ This runs after all tests have completed with pytest """ + pass + + def pytest_runtest_setup(): - # A placeholder for a method that runs before every test with pytest + """ This runs before every test with pytest """ pass def pytest_runtest_teardown(): - # A placeholder for a method that runs after every test with pytest + """ This runs after every test with pytest """ pass From 1ebc59df996ac2c1d20014ffca8ee6f8a1dce5f9 Mon Sep 17 00:00:00 2001 From: Michael Mintz Date: Tue, 16 Feb 2016 15:44:52 -0500 Subject: [PATCH 4/4] Version 1.1.27 --- integrations/docker/docker_setup.py | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/integrations/docker/docker_setup.py b/integrations/docker/docker_setup.py index 76a2d2f2e91..85881fc4b4f 100755 --- a/integrations/docker/docker_setup.py +++ b/integrations/docker/docker_setup.py @@ -8,7 +8,7 @@ setup( name='seleniumbase', - version='1.1.26', + version='1.1.27', author='Michael Mintz', author_email='@mintzworld', maintainer='Michael Mintz', diff --git a/setup.py b/setup.py index 8a42c98b72e..f65fe3f8ca8 100755 --- a/setup.py +++ b/setup.py @@ -6,7 +6,7 @@ setup( name='seleniumbase', - version='1.1.26', + version='1.1.27', url='https://github.com/mdmintz/SeleniumBase', author='Michael Mintz', author_email='@mintzworld',