From 63dbdfd252b549994607dfe1912a6716bdedd9a0 Mon Sep 17 00:00:00 2001 From: Thomas Robitaille Date: Thu, 9 Jun 2016 18:49:30 +0100 Subject: [PATCH] Minor improvements to coding style --- tests/conftest.py | 7 +++++++ tests/test_main.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/tests/conftest.py b/tests/conftest.py index b7101b83..c31a78aa 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -2,6 +2,9 @@ def pytest_configure(config): + """ + This function gets run by py.test at the very start + """ if 'USE_QT_API' in os.environ: os.environ['QT_API'] = os.environ['USE_QT_API'].lower() @@ -12,6 +15,10 @@ def pytest_configure(config): def pytest_report_header(config): + """ + This function is used by py.test to insert a customized header into the + test report. + """ versions = os.linesep versions += 'PyQt4: ' diff --git a/tests/test_main.py b/tests/test_main.py index 32b9d57f..7741225b 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -32,7 +32,7 @@ def test_qt_api(): If QT_API is specified, we check that the correct Qt wrapper was used """ - QT_API = os.environ.get('QT_API', None) + QT_API = os.environ.get('QT_API') if QT_API == 'pyside': assert_pyside()