diff --git a/_pytest/assertion/__init__.py b/_pytest/assertion/__init__.py index ec841e7c0..72af6d4fe 100644 --- a/_pytest/assertion/__init__.py +++ b/_pytest/assertion/__init__.py @@ -3,7 +3,6 @@ support for presenting detailed information in failing assertions. """ import py import sys -import pytest from _pytest.monkeypatch import monkeypatch from _pytest.assertion import util @@ -19,7 +18,7 @@ def pytest_addoption(parser): to provide assert expression information. """) group.addoption('--no-assert', action="store_true", default=False, dest="noassert", help="DEPRECATED equivalent to --assert=plain") - group.addoption('--nomagic', '--no-magic', action="store_true", + group.addoption('--nomagic', '--no-magic', action="store_true", default=False, help="DEPRECATED equivalent to --assert=plain") class AssertionState: diff --git a/_pytest/core.py b/_pytest/core.py index 61a8228d3..fbd7b1582 100644 --- a/_pytest/core.py +++ b/_pytest/core.py @@ -1,7 +1,7 @@ """ pytest PluginManager, basic initialization and tracing. """ -import sys, os +import sys import inspect import py diff --git a/_pytest/main.py b/_pytest/main.py index 16d89fef5..61095f62f 100644 --- a/_pytest/main.py +++ b/_pytest/main.py @@ -2,14 +2,12 @@ import py import pytest, _pytest -import inspect import os, sys, imp try: from collections import MutableMapping as MappingMixin except ImportError: from UserDict import DictMixin as MappingMixin -from _pytest.mark import MarkInfo from _pytest.runner import collect_one_node, Skipped tracebackcutdir = py.path.local(_pytest.__file__).dirpath() diff --git a/_pytest/nose.py b/_pytest/nose.py index 8702355e6..88e3d8680 100644 --- a/_pytest/nose.py +++ b/_pytest/nose.py @@ -1,7 +1,6 @@ """ run test suites written for nose. """ import pytest, py -import inspect import sys from _pytest import unittest diff --git a/_pytest/pytester.py b/_pytest/pytester.py index 7566085be..dbaae802d 100644 --- a/_pytest/pytester.py +++ b/_pytest/pytester.py @@ -4,7 +4,6 @@ import py, pytest import sys, os import codecs import re -import inspect import time from fnmatch import fnmatch from _pytest.main import Session, EXIT_OK diff --git a/_pytest/recwarn.py b/_pytest/recwarn.py index 5e5a92aa6..987ff8f97 100644 --- a/_pytest/recwarn.py +++ b/_pytest/recwarn.py @@ -1,14 +1,14 @@ """ recording warnings during test function execution. """ import py -import sys, os +import sys def pytest_funcarg__recwarn(request): """Return a WarningsRecorder instance that provides these methods: * ``pop(category=None)``: return last warning matching the category. * ``clear()``: clear list of warnings - + See http://docs.python.org/library/warnings.html for information on warning categories. """ diff --git a/_pytest/standalonetemplate.py b/_pytest/standalonetemplate.py index 6b3c1b51f..da8039756 100755 --- a/_pytest/standalonetemplate.py +++ b/_pytest/standalonetemplate.py @@ -6,7 +6,6 @@ sources = """ import sys import base64 import zlib -import imp class DictImporter(object): def __init__(self, sources): diff --git a/_pytest/unittest.py b/_pytest/unittest.py index 571a8360c..04e6ae105 100644 --- a/_pytest/unittest.py +++ b/_pytest/unittest.py @@ -1,6 +1,6 @@ """ discovery and running of std-library "unittest" style tests. """ import pytest, py -import sys, pdb +import sys # for transfering markers from _pytest.python import transfer_markers