Apply reorder-python-imports to all files

This commit is contained in:
Anthony Sottile 2018-10-25 00:01:29 -07:00
parent f6dfca7182
commit 2368fbb63c
109 changed files with 730 additions and 425 deletions

View File

@ -23,6 +23,11 @@ repos:
language_version: python3 language_version: python3
- id: flake8 - id: flake8
language_version: python3 language_version: python3
- repo: https://github.com/asottile/reorder_python_imports
rev: v1.3.2
hooks:
- id: reorder-python-imports
args: ['--application-directories=.:src']
- repo: https://github.com/asottile/pyupgrade - repo: https://github.com/asottile/pyupgrade
rev: v1.8.0 rev: v1.8.0
hooks: hooks:

View File

@ -2,7 +2,6 @@
# 2.7.5 3.3.2 # 2.7.5 3.3.2
# FilesCompleter 75.1109 69.2116 # FilesCompleter 75.1109 69.2116
# FastFilesCompleter 0.7383 1.0760 # FastFilesCompleter 0.7383 1.0760
import timeit import timeit
imports = [ imports = [

View File

@ -1,4 +1,5 @@
from six.moves import range from six.moves import range
import pytest import pytest

View File

@ -1,19 +1,17 @@
# flasky extensions. flasky pygments style based on tango style # flasky extensions. flasky pygments style based on tango style
from pygments.style import Style from pygments.style import Style
from pygments.token import ( from pygments.token import Comment
Keyword, from pygments.token import Error
Name, from pygments.token import Generic
Comment, from pygments.token import Keyword
String, from pygments.token import Literal
Error, from pygments.token import Name
Number, from pygments.token import Number
Operator, from pygments.token import Operator
Generic, from pygments.token import Other
Whitespace, from pygments.token import Punctuation
Punctuation, from pygments.token import String
Other, from pygments.token import Whitespace
Literal,
)
class FlaskyStyle(Style): class FlaskyStyle(Style):

View File

@ -10,17 +10,15 @@
# #
# All configuration values have a default; values that are commented out # All configuration values have a default; values that are commented out
# serve to show the default. # serve to show the default.
# The version info for the project you're documenting, acts as replacement for # The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the # |version| and |release|, also used in various other places throughout the
# built documents. # built documents.
# #
# The full version, including alpha/beta/rc tags. # The full version, including alpha/beta/rc tags.
# The short X.Y version. # The short X.Y version.
import datetime
import os import os
import sys import sys
import datetime
from _pytest import __version__ as version from _pytest import __version__ as version

View File

@ -1,7 +1,8 @@
from pytest import raises
import _pytest._code
import six import six
import _pytest._code
from pytest import raises
def otherfunc(a, b): def otherfunc(a, b):
assert a == b assert a == b

View File

@ -1,6 +1,7 @@
import pytest
import py import py
import pytest
mydir = py.path.local(__file__).dirpath() mydir = py.path.local(__file__).dirpath()

View File

@ -5,6 +5,7 @@ serialization via the pickle module.
import textwrap import textwrap
import py import py
import pytest import pytest
pythonlist = ["python2.7", "python3.4", "python3.5"] pythonlist = ["python2.7", "python3.4", "python3.5"]

View File

@ -1,5 +1,4 @@
# content of conftest.py # content of conftest.py
import pytest import pytest

View File

@ -1,4 +1,5 @@
import sys import sys
import pytest import pytest
py3 = sys.version_info[0] >= 3 py3 = sys.version_info[0] >= 3

View File

@ -1,4 +1,5 @@
import json import json
import py import py
import requests import requests

View File

@ -2,9 +2,13 @@
Invoke development tasks. Invoke development tasks.
""" """
import argparse import argparse
from colorama import init, Fore
from pathlib import Path from pathlib import Path
from subprocess import check_output, check_call, call from subprocess import call
from subprocess import check_call
from subprocess import check_output
from colorama import Fore
from colorama import init
def announce(version): def announce(version):

View File

@ -1,4 +1,5 @@
import os import os
from setuptools import setup from setuptools import setup

View File

@ -53,9 +53,12 @@ If things do not work right away:
which should throw a KeyError: 'COMPLINE' (which is properly set by the which should throw a KeyError: 'COMPLINE' (which is properly set by the
global argcomplete script). global argcomplete script).
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
import sys from __future__ import division
from __future__ import print_function
import os import os
import sys
from glob import glob from glob import glob

View File

@ -1,11 +1,14 @@
""" python inspection/code generation API """ """ python inspection/code generation API """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .code import Code # noqa from .code import Code # noqa
from .code import ExceptionInfo # noqa from .code import ExceptionInfo # noqa
from .code import Frame # noqa
from .code import Traceback # noqa
from .code import filter_traceback # noqa from .code import filter_traceback # noqa
from .code import Frame # noqa
from .code import getrawcode # noqa from .code import getrawcode # noqa
from .source import Source # noqa from .code import Traceback # noqa
from .source import compile_ as compile # noqa from .source import compile_ as compile # noqa
from .source import getfslineno # noqa from .source import getfslineno # noqa
from .source import Source # noqa

View File

@ -2,8 +2,13 @@
# CHANGES: # CHANGES:
# - some_str is replaced, trying to create unicode strings # - some_str is replaced, trying to create unicode strings
# #
from __future__ import absolute_import, division, print_function, unicode_literals from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from __future__ import unicode_literals
import types import types
from six import text_type from six import text_type

View File

@ -1,19 +1,27 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import pprint import pprint
import re
import sys import sys
import traceback import traceback
from inspect import CO_VARARGS, CO_VARKEYWORDS from inspect import CO_VARARGS
from inspect import CO_VARKEYWORDS
from weakref import ref
import attr import attr
import pluggy import pluggy
import re
from weakref import ref
import _pytest
from _pytest.compat import _PY2, _PY3, PY35, safe_str
from six import text_type
import py import py
import six import six
from six import text_type
import _pytest
from _pytest.compat import _PY2
from _pytest.compat import _PY3
from _pytest.compat import PY35
from _pytest.compat import safe_str
builtin_repr = repr builtin_repr = repr

View File

@ -1,15 +1,18 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
from ast import PyCF_ONLY_AST as _AST_FLAG import inspect
from bisect import bisect_right
import linecache import linecache
import sys import sys
import six
import inspect
import textwrap import textwrap
import tokenize import tokenize
from ast import PyCF_ONLY_AST as _AST_FLAG
from bisect import bisect_right
import py import py
import six
cpy_compile = compile cpy_compile = compile

View File

@ -1,13 +1,17 @@
""" """
support for presenting detailed information in failing assertions. support for presenting detailed information in failing assertions.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import six import six
from _pytest.assertion import util
from _pytest.assertion import rewrite from _pytest.assertion import rewrite
from _pytest.assertion import truncate from _pytest.assertion import truncate
from _pytest.assertion import util
def pytest_addoption(parser): def pytest_addoption(parser):

View File

@ -1,13 +1,15 @@
"""Rewrite assertion AST to produce nice error messages""" """Rewrite assertion AST to produce nice error messages"""
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import ast import ast
import errno import errno
import itertools
import imp import imp
import itertools
import marshal import marshal
import os import os
import re import re
import six
import string import string
import struct import struct
import sys import sys
@ -15,11 +17,12 @@ import types
import atomicwrites import atomicwrites
import py import py
import six
from _pytest.assertion import util from _pytest.assertion import util
from _pytest.pathlib import PurePath
from _pytest.compat import spec_from_file_location from _pytest.compat import spec_from_file_location
from _pytest.pathlib import fnmatch_ex from _pytest.pathlib import fnmatch_ex
from _pytest.pathlib import PurePath
# pytest caches rewritten pycs in __pycache__. # pytest caches rewritten pycs in __pycache__.
if hasattr(imp, "get_tag"): if hasattr(imp, "get_tag"):

View File

@ -4,7 +4,10 @@ Utilities for truncating assertion output.
Current default behaviour is to truncate assertion explanations at Current default behaviour is to truncate assertion explanations at
~8 terminal lines, unless running in "-vv" mode or running on CI. ~8 terminal lines, unless running in "-vv" mode or running on CI.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import six import six

View File

@ -1,10 +1,14 @@
"""Utilities for assertion debugging""" """Utilities for assertion debugging"""
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pprint import pprint
import _pytest._code
import py import py
import six import six
import _pytest._code
from ..compat import Sequence from ..compat import Sequence
u = six.text_type u = six.text_type

View File

@ -4,18 +4,22 @@ merged implementation of the cache provider
the name cache was not chosen to ensure pluggy automatically the name cache was not chosen to ensure pluggy automatically
ignores the external pytest-cache ignores the external pytest-cache
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import json
from collections import OrderedDict from collections import OrderedDict
import attr
import py import py
import six import six
import attr
import pytest import pytest
import json
from .compat import _PY2 as PY2 from .compat import _PY2 as PY2
from .pathlib import Path, resolve_from_str, rmtree from .pathlib import Path
from .pathlib import resolve_from_str
from .pathlib import rmtree
README_CONTENT = u"""\ README_CONTENT = u"""\
# pytest cache directory # # pytest cache directory #

View File

@ -2,17 +2,20 @@
per-test stdout/stderr capturing mechanism. per-test stdout/stderr capturing mechanism.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections import collections
import contextlib import contextlib
import sys
import os
import io import io
import os
import sys
from io import UnsupportedOperation from io import UnsupportedOperation
from tempfile import TemporaryFile from tempfile import TemporaryFile
import six import six
import pytest import pytest
from _pytest.compat import CaptureIO from _pytest.compat import CaptureIO

View File

@ -1,7 +1,9 @@
""" """
python version compatibility code python version compatibility code
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import codecs import codecs
import functools import functools
@ -11,11 +13,12 @@ import sys
from contextlib import contextmanager from contextlib import contextmanager
import py import py
import six
from six import text_type
import _pytest import _pytest
from _pytest.outcomes import TEST_OUTCOME, fail from _pytest.outcomes import fail
from six import text_type from _pytest.outcomes import TEST_OUTCOME
import six
try: try:
import enum import enum

View File

@ -1,27 +1,34 @@
""" command line options, ini-file and conftest.py processing. """ """ command line options, ini-file and conftest.py processing. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import copy
import inspect import inspect
import os
import shlex import shlex
import sys
import types import types
import warnings import warnings
import copy
import six
import py
# DON't import pytest here because it causes import cycle troubles import py
import sys import six
import os from pluggy import HookimplMarker
from _pytest.outcomes import Skipped from pluggy import HookspecMarker
from pluggy import PluginManager
import _pytest._code import _pytest._code
import _pytest.hookspec # the extension point definitions
import _pytest.assertion import _pytest.assertion
from pluggy import PluginManager, HookimplMarker, HookspecMarker import _pytest.hookspec # the extension point definitions
from _pytest._code import ExceptionInfo, filter_traceback from .exceptions import PrintHelp
from .exceptions import UsageError
from .findpaths import determine_setup
from .findpaths import exists
from _pytest._code import ExceptionInfo
from _pytest._code import filter_traceback
from _pytest.compat import safe_str from _pytest.compat import safe_str
from .exceptions import UsageError, PrintHelp from _pytest.outcomes import Skipped
from .findpaths import determine_setup, exists
hookimpl = HookimplMarker("pytest") hookimpl = HookimplMarker("pytest")
hookspec = HookspecMarker("pytest") hookspec = HookspecMarker("pytest")

View File

@ -1,11 +1,10 @@
import six
import warnings
import argparse import argparse
from gettext import gettext as _
import sys as _sys import sys as _sys
import warnings
from gettext import gettext as _
import py import py
import six
from ..main import EXIT_USAGEERROR from ..main import EXIT_USAGEERROR

View File

@ -1,5 +1,7 @@
import py
import os import os
import py
from .exceptions import UsageError from .exceptions import UsageError

View File

@ -1,5 +1,7 @@
""" interactive debugging with PDB, the Python Debugger. """ """ interactive debugging with PDB, the Python Debugger. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pdb import pdb
import sys import sys

View File

@ -8,10 +8,12 @@ be removed when the time comes.
All constants defined in this module should be either PytestWarning instances or UnformattedWarning All constants defined in this module should be either PytestWarning instances or UnformattedWarning
in case of warnings which need to format their messages. in case of warnings which need to format their messages.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from _pytest.warning_types import RemovedInPytest4Warning
from _pytest.warning_types import UnformattedWarning, RemovedInPytest4Warning from _pytest.warning_types import UnformattedWarning
MAIN_STR_ARGS = RemovedInPytest4Warning( MAIN_STR_ARGS = RemovedInPytest4Warning(

View File

@ -1,12 +1,16 @@
""" discover and run doctests in modules and test files.""" """ discover and run doctests in modules and test files."""
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import traceback
import sys
import platform import platform
import sys
import traceback
import pytest import pytest
from _pytest._code.code import ExceptionInfo, ReprFileLocation, TerminalRepr from _pytest._code.code import ExceptionInfo
from _pytest._code.code import ReprFileLocation
from _pytest._code.code import TerminalRepr
from _pytest.fixtures import FixtureRequest from _pytest.fixtures import FixtureRequest

View File

@ -1,39 +1,41 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import inspect import inspect
import sys import sys
import warnings import warnings
from collections import OrderedDict, deque, defaultdict from collections import defaultdict
from collections import deque
import six from collections import OrderedDict
from more_itertools import flatten
import attr import attr
import py import py
import six
from more_itertools import flatten
from py._code.code import FormattedExcinfo from py._code.code import FormattedExcinfo
import _pytest import _pytest
from _pytest import nodes from _pytest import nodes
from _pytest._code.code import TerminalRepr from _pytest._code.code import TerminalRepr
from _pytest.compat import ( from _pytest.compat import _format_args
NOTSET, from _pytest.compat import _PytestWrapper
exc_clear, from _pytest.compat import exc_clear
_format_args, from _pytest.compat import FuncargnamesCompatAttr
getfslineno, from _pytest.compat import get_real_func
get_real_func, from _pytest.compat import get_real_method
is_generator, from _pytest.compat import getfslineno
isclass, from _pytest.compat import getfuncargnames
getimfunc, from _pytest.compat import getimfunc
getlocation, from _pytest.compat import getlocation
getfuncargnames, from _pytest.compat import is_generator
safe_getattr, from _pytest.compat import isclass
FuncargnamesCompatAttr, from _pytest.compat import NOTSET
get_real_method, from _pytest.compat import safe_getattr
_PytestWrapper,
)
from _pytest.deprecated import FIXTURE_FUNCTION_CALL from _pytest.deprecated import FIXTURE_FUNCTION_CALL
from _pytest.outcomes import fail, TEST_OUTCOME from _pytest.outcomes import fail
from _pytest.outcomes import TEST_OUTCOME
FIXTURE_MSG = 'fixtures cannot have "pytest_funcarg__" prefix and be decorated with @pytest.fixture:\n{}' FIXTURE_MSG = 'fixtures cannot have "pytest_funcarg__" prefix and be decorated with @pytest.fixture:\n{}'

View File

@ -2,7 +2,9 @@
Provides a function to report all internal modules for using freezing tools Provides a function to report all internal modules for using freezing tools
pytest pytest
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
def freeze_includes(): def freeze_includes():

View File

@ -1,13 +1,17 @@
""" version info, help messages, tracing configuration. """ """ version info, help messages, tracing configuration. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import py
import pytest
from _pytest.config import PrintHelp
import os import os
import sys import sys
from argparse import Action from argparse import Action
import py
import pytest
from _pytest.config import PrintHelp
class HelpAction(Action): class HelpAction(Action):
"""This is an argparse Action that will raise an exception in """This is an argparse Action that will raise an exception in

View File

@ -1,6 +1,6 @@
""" hook specifications for pytest plugins, invoked from main.py and builtin plugins. """ """ hook specifications for pytest plugins, invoked from main.py and builtin plugins. """
from pluggy import HookspecMarker from pluggy import HookspecMarker
from .deprecated import PYTEST_NAMESPACE from .deprecated import PYTEST_NAMESPACE

View File

@ -8,14 +8,18 @@ Based on initial code from Ross Lawley.
Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/ Output conforms to https://github.com/jenkinsci/xunit-plugin/blob/master/
src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd src/main/resources/org/jenkinsci/plugins/xunit/types/model/xsd/junit-10.xsd
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import functools import functools
import py
import os import os
import re import re
import sys import sys
import time import time
import py
import pytest import pytest
from _pytest import nodes from _pytest import nodes
from _pytest.config import filename_arg from _pytest.config import filename_arg

View File

@ -1,15 +1,18 @@
""" Access and control log capturing. """ """ Access and control log capturing. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import logging import logging
from contextlib import contextmanager
import re import re
from contextlib import contextmanager
import py
import six import six
import pytest
from _pytest.compat import dummy_context_manager from _pytest.compat import dummy_context_manager
from _pytest.config import create_terminal_writer from _pytest.config import create_terminal_writer
import pytest
import py
DEFAULT_LOG_FORMAT = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s" DEFAULT_LOG_FORMAT = "%(filename)-25s %(lineno)4d %(levelname)-8s %(message)s"

View File

@ -1,19 +1,22 @@
""" core implementation of testing process: init, session, runtest loop. """ """ core implementation of testing process: init, session, runtest loop. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import contextlib import contextlib
import functools import functools
import os import os
import pkgutil import pkgutil
import six
import sys import sys
import _pytest
from _pytest import nodes
import _pytest._code
import py import py
import six
from _pytest.config import directory_arg, UsageError, hookimpl import _pytest._code
from _pytest import nodes
from _pytest.config import directory_arg
from _pytest.config import hookimpl
from _pytest.config import UsageError
from _pytest.outcomes import exit from _pytest.outcomes import exit
from _pytest.runner import collect_one_node from _pytest.runner import collect_one_node

View File

@ -1,18 +1,20 @@
""" generic mechanism for marking and selecting python functions. """ """ generic mechanism for marking and selecting python functions. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from .legacy import matchkeyword
from .legacy import matchmark
from .structures import EMPTY_PARAMETERSET_OPTION
from .structures import get_empty_parameterset_mark
from .structures import Mark
from .structures import MARK_GEN
from .structures import MarkDecorator
from .structures import MarkGenerator
from .structures import MarkInfo
from .structures import ParameterSet
from .structures import transfer_markers
from _pytest.config import UsageError from _pytest.config import UsageError
from .structures import (
ParameterSet,
EMPTY_PARAMETERSET_OPTION,
MARK_GEN,
Mark,
MarkInfo,
MarkDecorator,
MarkGenerator,
transfer_markers,
get_empty_parameterset_mark,
)
from .legacy import matchkeyword, matchmark
__all__ = [ __all__ = [
"Mark", "Mark",

View File

@ -1,10 +1,12 @@
import os import os
import six
import sys
import platform import platform
import sys
import traceback import traceback
from ..outcomes import fail, TEST_OUTCOME import six
from ..outcomes import fail
from ..outcomes import TEST_OUTCOME
def cached_eval(config, expr, d): def cached_eval(config, expr, d):

View File

@ -2,9 +2,10 @@
this is a place where we put datastructures used by legacy apis this is a place where we put datastructures used by legacy apis
we hope ot remove we hope ot remove
""" """
import attr
import keyword import keyword
import attr
from _pytest.config import UsageError from _pytest.config import UsageError

View File

@ -5,12 +5,15 @@ from functools import reduce
from operator import attrgetter from operator import attrgetter
import attr import attr
from _pytest.outcomes import fail
from ..deprecated import MARK_PARAMETERSET_UNPACKING, MARK_INFO_ATTRIBUTE
from ..compat import NOTSET, getfslineno, MappingMixin
from six.moves import map from six.moves import map
from ..compat import getfslineno
from ..compat import MappingMixin
from ..compat import NOTSET
from ..deprecated import MARK_INFO_ATTRIBUTE
from ..deprecated import MARK_PARAMETERSET_UNPACKING
from _pytest.outcomes import fail
EMPTY_PARAMETERSET_OPTION = "empty_parameter_set_mark" EMPTY_PARAMETERSET_OPTION = "empty_parameter_set_mark"

View File

@ -1,9 +1,11 @@
""" monkeypatching and mocking functionality. """ """ monkeypatching and mocking functionality. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys
import re import re
import sys
import warnings import warnings
from contextlib import contextmanager from contextlib import contextmanager

View File

@ -1,18 +1,20 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import warnings import warnings
import six
import py
import attr import attr
import py
import six
import _pytest
import _pytest._code import _pytest._code
from _pytest.compat import getfslineno from _pytest.compat import getfslineno
from _pytest.mark.structures import MarkInfo
from _pytest.mark.structures import NodeKeywords
from _pytest.outcomes import fail from _pytest.outcomes import fail
from _pytest.mark.structures import NodeKeywords, MarkInfo
SEP = "/" SEP = "/"
tracebackcutdir = py.path.local(_pytest.__file__).dirpath() tracebackcutdir = py.path.local(_pytest.__file__).dirpath()

View File

@ -1,9 +1,13 @@
""" run test suites written for nose. """ """ run test suites written for nose. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from _pytest import unittest, runner, python from _pytest import python
from _pytest import runner
from _pytest import unittest
from _pytest.config import hookimpl from _pytest.config import hookimpl

View File

@ -2,7 +2,10 @@
exception classes and constants handling test outcomes exception classes and constants handling test outcomes
as well as functions creating them as well as functions creating them
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys

View File

@ -1,11 +1,15 @@
""" submit failure or test session information to a pastebin service. """ """ submit failure or test session information to a pastebin service. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest
import six
import sys import sys
import tempfile import tempfile
import six
import pytest
def pytest_addoption(parser): def pytest_addoption(parser):
group = parser.getgroup("terminal reporting") group = parser.getgroup("terminal reporting")

View File

@ -1,19 +1,22 @@
import os
import errno
import atexit import atexit
import operator import errno
import six
import sys
from functools import reduce
import uuid
from six.moves import map
import itertools
import shutil
from os.path import expanduser, expandvars, isabs, sep
from posixpath import sep as posix_sep
import fnmatch import fnmatch
import itertools
import operator
import os
import shutil
import stat import stat
import sys
import uuid
from functools import reduce
from os.path import expanduser
from os.path import expandvars
from os.path import isabs
from os.path import sep
from posixpath import sep as posix_sep
import six
from six.moves import map
from .compat import PY36 from .compat import PY36

View File

@ -1,5 +1,7 @@
"""(disabled by default) support for testing pytest and pytest plugins.""" """(disabled by default) support for testing pytest and pytest plugins."""
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import codecs import codecs
import gc import gc
@ -7,23 +9,25 @@ import os
import platform import platform
import re import re
import subprocess import subprocess
import six
import sys import sys
import time import time
import traceback import traceback
from fnmatch import fnmatch from fnmatch import fnmatch
from weakref import WeakKeyDictionary from weakref import WeakKeyDictionary
from _pytest.capture import MultiCapture, SysCapture
from _pytest._code import Source
from _pytest.main import Session, EXIT_INTERRUPTED, EXIT_OK
from _pytest.assertion.rewrite import AssertionRewritingHook
from _pytest.pathlib import Path
from _pytest.compat import safe_str
import py import py
import six
import pytest import pytest
from _pytest._code import Source
from _pytest.assertion.rewrite import AssertionRewritingHook
from _pytest.capture import MultiCapture
from _pytest.capture import SysCapture
from _pytest.compat import safe_str
from _pytest.main import EXIT_INTERRUPTED
from _pytest.main import EXIT_OK
from _pytest.main import Session
from _pytest.pathlib import Path
IGNORE_PAM = [ # filenames added when obtaining details about the current user IGNORE_PAM = [ # filenames added when obtaining details about the current user
u"/var/lib/sss/mc/passwd" u"/var/lib/sss/mc/passwd"

View File

@ -1,50 +1,48 @@
""" Python test discovery, setup and run of test functions. """ """ Python test discovery, setup and run of test functions. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import collections
import fnmatch import fnmatch
import inspect import inspect
import sys
import os import os
import collections import sys
import warnings import warnings
from textwrap import dedent from textwrap import dedent
import py import py
import six import six
from _pytest.main import FSHookProxy
from _pytest.config import hookimpl
import _pytest import _pytest
from _pytest._code import filter_traceback from _pytest import deprecated
from _pytest import fixtures from _pytest import fixtures
from _pytest import nodes from _pytest import nodes
from _pytest import deprecated from _pytest._code import filter_traceback
from _pytest.compat import ( from _pytest.compat import ascii_escaped
isclass, from _pytest.compat import enum
isfunction, from _pytest.compat import get_default_arg_names
is_generator, from _pytest.compat import get_real_func
ascii_escaped, from _pytest.compat import getfslineno
REGEX_TYPE, from _pytest.compat import getimfunc
STRING_TYPES, from _pytest.compat import getlocation
NoneType, from _pytest.compat import is_generator
NOTSET, from _pytest.compat import isclass
get_real_func, from _pytest.compat import isfunction
getfslineno, from _pytest.compat import NoneType
safe_getattr, from _pytest.compat import NOTSET
safe_str, from _pytest.compat import REGEX_TYPE
getlocation, from _pytest.compat import safe_getattr
enum, from _pytest.compat import safe_str
get_default_arg_names, from _pytest.compat import STRING_TYPES
getimfunc, from _pytest.config import hookimpl
) from _pytest.main import FSHookProxy
from _pytest.mark.structures import get_unpacked_marks
from _pytest.mark.structures import normalize_mark_list
from _pytest.mark.structures import transfer_markers
from _pytest.outcomes import fail from _pytest.outcomes import fail
from _pytest.mark.structures import ( from _pytest.warning_types import PytestWarning
transfer_markers, from _pytest.warning_types import RemovedInPytest4Warning
get_unpacked_marks,
normalize_mark_list,
)
from _pytest.warning_types import RemovedInPytest4Warning, PytestWarning
def pyobj_property(name): def pyobj_property(name):

View File

@ -1,20 +1,20 @@
import math import math
import pprint import pprint
import sys import sys
from numbers import Number
from decimal import Decimal from decimal import Decimal
from numbers import Number
import six import six
from six.moves import zip, filterfalse
from more_itertools.more import always_iterable from more_itertools.more import always_iterable
from six.moves import filterfalse
from six.moves import zip
from _pytest.compat import isclass
from _pytest.compat import Mapping, Sequence
from _pytest.compat import STRING_TYPES
from _pytest.outcomes import fail
import _pytest._code import _pytest._code
from _pytest.compat import isclass
from _pytest.compat import Mapping
from _pytest.compat import Sequence
from _pytest.compat import STRING_TYPES
from _pytest.outcomes import fail
BASE_TYPE = (type, STRING_TYPES) BASE_TYPE = (type, STRING_TYPES)

View File

@ -1,15 +1,16 @@
""" recording warnings during test function execution. """ """ recording warnings during test function execution. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import _pytest._code
import re import re
import sys import sys
import warnings import warnings
import six import six
import _pytest._code
from _pytest.fixtures import yield_fixture from _pytest.fixtures import yield_fixture
from _pytest.outcomes import fail from _pytest.outcomes import fail

View File

@ -1,4 +1,5 @@
import py import py
from _pytest._code.code import TerminalRepr from _pytest._code.code import TerminalRepr

View File

@ -1,10 +1,13 @@
""" log machine-parseable test session result information in a plain """ log machine-parseable test session result information in a plain
text file. text file.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import py import py
import os
def pytest_addoption(parser): def pytest_addoption(parser):

View File

@ -1,5 +1,7 @@
""" basic collect and runtest protocol implementations """ """ basic collect and runtest protocol implementations """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import bdb import bdb
import os import os
@ -7,10 +9,14 @@ import sys
from time import time from time import time
import six import six
from _pytest._code.code import ExceptionInfo
from _pytest.outcomes import skip, Skipped, TEST_OUTCOME
from .reports import TestReport, CollectReport, CollectErrorRepr from .reports import CollectErrorRepr
from .reports import CollectReport
from .reports import TestReport
from _pytest._code.code import ExceptionInfo
from _pytest.outcomes import skip
from _pytest.outcomes import Skipped
from _pytest.outcomes import TEST_OUTCOME
# #
# pytest plugin hooks # pytest plugin hooks

View File

@ -1,7 +1,10 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys
import pytest import pytest
import sys
def pytest_addoption(parser): def pytest_addoption(parser):

View File

@ -1,4 +1,6 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,9 +1,13 @@
""" support for skip/xfail functions and markers. """ """ support for skip/xfail functions and markers. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
from _pytest.config import hookimpl from _pytest.config import hookimpl
from _pytest.mark.evaluate import MarkEvaluator from _pytest.mark.evaluate import MarkEvaluator
from _pytest.outcomes import fail, skip, xfail from _pytest.outcomes import fail
from _pytest.outcomes import skip
from _pytest.outcomes import xfail
def pytest_addoption(parser): def pytest_addoption(parser):

View File

@ -2,8 +2,11 @@
This is a good source for looking at the various reporting hooks. This is a good source for looking at the various reporting hooks.
""" """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse
import itertools import itertools
import platform import platform
import sys import sys
@ -17,16 +20,11 @@ from more_itertools import collapse
import pytest import pytest
from _pytest import nodes from _pytest import nodes
from _pytest.main import ( from _pytest.main import EXIT_INTERRUPTED
EXIT_OK, from _pytest.main import EXIT_NOTESTSCOLLECTED
EXIT_TESTSFAILED, from _pytest.main import EXIT_OK
EXIT_INTERRUPTED, from _pytest.main import EXIT_TESTSFAILED
EXIT_USAGEERROR, from _pytest.main import EXIT_USAGEERROR
EXIT_NOTESTSCOLLECTED,
)
import argparse
class MoreQuietAction(argparse.Action): class MoreQuietAction(argparse.Action):

View File

@ -1,22 +1,23 @@
""" support for providing temporary directories to test functions. """ """ support for providing temporary directories to test functions. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import re import re
import pytest
import py
from _pytest.monkeypatch import MonkeyPatch
import attr
import tempfile import tempfile
import warnings import warnings
from .pathlib import ( import attr
Path, import py
make_numbered_dir,
make_numbered_dir_with_cleanup, import pytest
ensure_reset_dir, from .pathlib import ensure_reset_dir
LOCK_TIMEOUT, from .pathlib import LOCK_TIMEOUT
) from .pathlib import make_numbered_dir
from .pathlib import make_numbered_dir_with_cleanup
from .pathlib import Path
from _pytest.monkeypatch import MonkeyPatch
@attr.s @attr.s

View File

@ -1,15 +1,21 @@
""" discovery and running of std-library "unittest" style tests. """ """ discovery and running of std-library "unittest" style tests. """
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import traceback import traceback
# for transferring markers
import _pytest._code import _pytest._code
from _pytest.config import hookimpl
from _pytest.outcomes import fail, skip, xfail
from _pytest.python import transfer_markers, Class, Module, Function
from _pytest.compat import getimfunc from _pytest.compat import getimfunc
from _pytest.config import hookimpl
from _pytest.outcomes import fail
from _pytest.outcomes import skip
from _pytest.outcomes import xfail
from _pytest.python import Class
from _pytest.python import Function
from _pytest.python import Module
from _pytest.python import transfer_markers
def pytest_pycollect_makeitem(collector, name, obj): def pytest_pycollect_makeitem(collector, name, obj):

View File

@ -1,11 +1,12 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import warnings import warnings
from contextlib import contextmanager from contextlib import contextmanager
import pytest import pytest
from _pytest import compat from _pytest import compat

View File

@ -2,30 +2,44 @@
""" """
pytest: unit and functional testing with Python. pytest: unit and functional testing with Python.
""" """
# else we are imported # else we are imported
from _pytest.config import main, UsageError, cmdline, hookspec, hookimpl
from _pytest.fixtures import fixture, yield_fixture
from _pytest.assertion import register_assert_rewrite
from _pytest.freeze_support import freeze_includes
from _pytest import __version__ from _pytest import __version__
from _pytest.assertion import register_assert_rewrite
from _pytest.config import cmdline
from _pytest.config import hookimpl
from _pytest.config import hookspec
from _pytest.config import main
from _pytest.config import UsageError
from _pytest.debugging import pytestPDB as __pytestPDB from _pytest.debugging import pytestPDB as __pytestPDB
from _pytest.recwarn import warns, deprecated_call
from _pytest.outcomes import fail, skip, importorskip, exit, xfail
from _pytest.mark import MARK_GEN as mark, param
from _pytest.main import Session
from _pytest.nodes import Item, Collector, File
from _pytest.fixtures import fillfixtures as _fillfuncargs from _pytest.fixtures import fillfixtures as _fillfuncargs
from _pytest.python import Package, Module, Class, Instance, Function, Generator from _pytest.fixtures import fixture
from _pytest.python_api import approx, raises from _pytest.fixtures import yield_fixture
from _pytest.warning_types import ( from _pytest.freeze_support import freeze_includes
PytestWarning, from _pytest.main import Session
PytestDeprecationWarning, from _pytest.mark import MARK_GEN as mark
RemovedInPytest4Warning, from _pytest.mark import param
PytestExperimentalApiWarning, from _pytest.nodes import Collector
) from _pytest.nodes import File
from _pytest.nodes import Item
from _pytest.outcomes import exit
from _pytest.outcomes import fail
from _pytest.outcomes import importorskip
from _pytest.outcomes import skip
from _pytest.outcomes import xfail
from _pytest.python import Class
from _pytest.python import Function
from _pytest.python import Generator
from _pytest.python import Instance
from _pytest.python import Module
from _pytest.python import Package
from _pytest.python_api import approx
from _pytest.python_api import raises
from _pytest.recwarn import deprecated_call
from _pytest.recwarn import warns
from _pytest.warning_types import PytestDeprecationWarning
from _pytest.warning_types import PytestExperimentalApiWarning
from _pytest.warning_types import PytestWarning
from _pytest.warning_types import RemovedInPytest4Warning
set_trace = __pytestPDB.set_trace set_trace = __pytestPDB.set_trace

View File

@ -1,15 +1,19 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
import textwrap import textwrap
import types import types
import py
import six import six
import py
import pytest import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED, EXIT_USAGEERROR from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import EXIT_USAGEERROR
def prepend_pythonpath(*dirs): def prepend_pythonpath(*dirs):

View File

@ -1,13 +1,15 @@
# coding: utf-8 # coding: utf-8
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from six import text_type
from test_excinfo import TWMock
import _pytest._code import _pytest._code
import pytest import pytest
from six import text_type
from test_excinfo import TWMock
try: try:
import mock import mock

View File

@ -1,24 +1,25 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import operator import operator
import os import os
import sys import sys
import textwrap import textwrap
import _pytest
import py
import pytest
import six
from _pytest._code.code import (
ExceptionInfo,
FormattedExcinfo,
ReprExceptionInfo,
ExceptionChainRepr,
)
from six.moves import queue
import py
import six
from six.moves import queue
from test_source import astonly from test_source import astonly
import _pytest
import pytest
from _pytest._code.code import ExceptionChainRepr
from _pytest._code.code import ExceptionInfo
from _pytest._code.code import FormattedExcinfo
from _pytest._code.code import ReprExceptionInfo
try: try:
import importlib import importlib
except ImportError: except ImportError:

View File

@ -2,13 +2,17 @@
# flake8: noqa # flake8: noqa
# disable flake check on this file because some constructs are strange # disable flake check on this file because some constructs are strange
# or redundant on purpose and can't be disable on a line-by-line basis # or redundant on purpose and can't be disable on a line-by-line basis
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import inspect import inspect
import sys import sys
import six
import _pytest._code import _pytest._code
import pytest import pytest
import six
from _pytest._code import Source from _pytest._code import Source
from _pytest._code.source import ast from _pytest._code.source import ast

View File

@ -1,4 +1,6 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os

View File

@ -1,6 +1,7 @@
import pytest
import pprint import pprint
import pytest
def pytest_generate_tests(metafunc): def pytest_generate_tests(metafunc):
if "arg1" in metafunc.fixturenames: if "arg1" in metafunc.fixturenames:

View File

@ -1,6 +1,7 @@
import pytest
import unittest import unittest
import pytest
@pytest.fixture(params=[1, 2]) @pytest.fixture(params=[1, 2])
def two(request): def two(request):

View File

@ -1,6 +1,7 @@
import logging import logging
import py.io import py.io
from _pytest.logging import ColoredLevelFormatter from _pytest.logging import ColoredLevelFormatter

View File

@ -1,6 +1,6 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re
import os import os
import re
from io import open from io import open
import six import six

View File

@ -1,13 +1,14 @@
# encoding: utf-8 # encoding: utf-8
import doctest
import operator import operator
import sys import sys
import pytest
import doctest
from pytest import approx
from operator import eq, ne
from decimal import Decimal from decimal import Decimal
from fractions import Fraction from fractions import Fraction
from operator import eq
from operator import ne
import pytest
from pytest import approx
inf, nan = float("inf"), float("nan") inf, nan = float("inf"), float("nan")

View File

@ -3,10 +3,11 @@ import sys
import textwrap import textwrap
import pytest import pytest
from _pytest.pytester import get_public_names
from _pytest.fixtures import FixtureLookupError, FixtureRequest
from _pytest import fixtures from _pytest import fixtures
from _pytest.fixtures import FixtureLookupError
from _pytest.fixtures import FixtureRequest
from _pytest.pathlib import Path from _pytest.pathlib import Path
from _pytest.pytester import get_public_names
def test_getfuncargnames(): def test_getfuncargnames():

View File

@ -1,14 +1,16 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re
import sys import sys
import attr
import textwrap import textwrap
import pytest
from _pytest import python, fixtures
import attr
import hypothesis import hypothesis
from hypothesis import strategies from hypothesis import strategies
import pytest
from _pytest import fixtures
from _pytest import python
PY3 = sys.version_info >= (3, 0) PY3 = sys.version_info >= (3, 0)

View File

@ -1,7 +1,8 @@
from _pytest.outcomes import Failed
import pytest
import sys import sys
import pytest
from _pytest.outcomes import Failed
class TestRaises(object): class TestRaises(object):
def test_raises(self): def test_raises(self):

View File

@ -1,6 +1,10 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import subprocess import subprocess
import sys import sys
import pytest import pytest
# test for _argcomplete but not specific for any application # test for _argcomplete but not specific for any application

View File

@ -1,14 +1,18 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import textwrap import textwrap
import _pytest.assertion as plugin
import py import py
import pytest
import six import six
from _pytest.assertion import util
import _pytest.assertion as plugin
import pytest
from _pytest.assertion import truncate from _pytest.assertion import truncate
from _pytest.assertion import util
PY3 = sys.version_info >= (3, 0) PY3 = sys.version_info >= (3, 0)

View File

@ -1,5 +1,7 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import glob import glob
import os import os
@ -8,17 +10,16 @@ import stat
import sys import sys
import textwrap import textwrap
import zipfile import zipfile
import py import py
import pytest
import six import six
import _pytest._code import _pytest._code
import pytest
from _pytest.assertion import util from _pytest.assertion import util
from _pytest.assertion.rewrite import ( from _pytest.assertion.rewrite import AssertionRewritingHook
rewrite_asserts, from _pytest.assertion.rewrite import PYTEST_TAG
PYTEST_TAG, from _pytest.assertion.rewrite import rewrite_asserts
AssertionRewritingHook,
)
from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED
ast = pytest.importorskip("ast") ast = pytest.importorskip("ast")

View File

@ -1,12 +1,15 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os
import shutil
import sys import sys
import textwrap import textwrap
import py import py
import pytest import pytest
import os
import shutil
pytest_plugins = ("pytester",) pytest_plugins = ("pytester",)

View File

@ -1,22 +1,26 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
# note: py.io capture tests where copied from import contextlib
# pylib 1.4.20.dev2 (rev 13d9af95547e)
import pickle
import os import os
import pickle
import sys import sys
import textwrap import textwrap
from io import UnsupportedOperation from io import UnsupportedOperation
import py import py
import pytest
import contextlib
from six import text_type from six import text_type
import pytest
from _pytest import capture from _pytest import capture
from _pytest.capture import CaptureManager from _pytest.capture import CaptureManager
from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED
# note: py.io capture tests where copied from
# pylib 1.4.20.dev2 (rev 13d9af95547e)
needsosdup = pytest.mark.skipif( needsosdup = pytest.mark.skipif(
not hasattr(os, "dup"), reason="test needs os.dup, not available on this platform" not hasattr(os, "dup"), reason="test needs os.dup, not available on this platform"

View File

@ -1,10 +1,15 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pprint import pprint
import sys import sys
import textwrap import textwrap
import pytest
from _pytest.main import Session, EXIT_NOTESTSCOLLECTED, _in_venv import pytest
from _pytest.main import _in_venv
from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import Session
class TestCollector(object): class TestCollector(object):

View File

@ -1,11 +1,17 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
from functools import wraps from functools import wraps
import six import six
import pytest import pytest
from _pytest.compat import is_generator, get_real_func, safe_getattr, _PytestWrapper from _pytest.compat import _PytestWrapper
from _pytest.compat import get_real_func
from _pytest.compat import is_generator
from _pytest.compat import safe_getattr
from _pytest.outcomes import OutcomeException from _pytest.outcomes import OutcomeException

View File

@ -1,11 +1,16 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import textwrap import textwrap
import pytest
import _pytest._code import _pytest._code
from _pytest.config.findpaths import getcfg, get_common_ancestor, determine_setup import pytest
from _pytest.config import _iter_rewritable_modules from _pytest.config import _iter_rewritable_modules
from _pytest.config.findpaths import determine_setup
from _pytest.config.findpaths import get_common_ancestor
from _pytest.config.findpaths import getcfg
from _pytest.main import EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED

View File

@ -1,10 +1,16 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import textwrap import textwrap
import py import py
import pytest import pytest
from _pytest.config import PytestPluginManager from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED, EXIT_OK, EXIT_USAGEERROR from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import EXIT_OK
from _pytest.main import EXIT_USAGEERROR
@pytest.fixture(scope="module", params=["global", "inpackage"]) @pytest.fixture(scope="module", params=["global", "inpackage"])

View File

@ -1,10 +1,16 @@
# encoding: utf-8 # encoding: utf-8
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import textwrap import textwrap
from _pytest.compat import MODULE_NOT_FOUND_ERROR
from _pytest.doctest import DoctestItem, DoctestModule, DoctestTextfile
import pytest import pytest
from _pytest.compat import MODULE_NOT_FOUND_ERROR
from _pytest.doctest import DoctestItem
from _pytest.doctest import DoctestModule
from _pytest.doctest import DoctestTextfile
class TestDoctests(object): class TestDoctests(object):

View File

@ -1,4 +1,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pkg_resources import pkg_resources
import pytest import pytest

View File

@ -1,6 +1,9 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from _pytest.main import EXIT_NOTESTSCOLLECTED from __future__ import division
from __future__ import print_function
import pytest import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED
def test_version(testdir, pytestconfig): def test_version(testdir, pytestconfig):

View File

@ -1,12 +1,16 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from xml.dom import minidom from __future__ import division
import py from __future__ import print_function
import sys
import os
from _pytest.junitxml import LogXML
import pytest
import os
import sys
from xml.dom import minidom
import py
import pytest
from _pytest.junitxml import LogXML
from _pytest.reports import BaseReport from _pytest.reports import BaseReport

View File

@ -1,4 +1,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys

View File

@ -1,8 +1,10 @@
import py
import subprocess import subprocess
import sys import sys
import pytest
import py
import _pytest import _pytest
import pytest
MODSET = [ MODSET = [
x x

View File

@ -1,4 +1,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import sys import sys
import textwrap import textwrap

View File

@ -1,5 +1,4 @@
import pytest import pytest
from _pytest import nodes from _pytest import nodes

View File

@ -1,4 +1,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import pytest import pytest

View File

@ -1,8 +1,13 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import argparse import argparse
import sys
import os import os
import sys
import py import py
import pytest import pytest
from _pytest.config import argparsing as parseopt from _pytest.config import argparsing as parseopt

View File

@ -1,6 +1,10 @@
# encoding: utf-8 # encoding: utf-8
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import sys import sys
import pytest import pytest

View File

@ -3,7 +3,6 @@ import sys
import py import py
import pytest import pytest
from _pytest.pathlib import fnmatch_ex from _pytest.pathlib import fnmatch_ex

View File

@ -1,7 +1,10 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
import sys from __future__ import division
import platform from __future__ import print_function
import os import os
import platform
import sys
import _pytest._code import _pytest._code
import pytest import pytest

View File

@ -1,13 +1,18 @@
# encoding: UTF-8 # encoding: UTF-8
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
import pytest from __future__ import division
from __future__ import print_function
import os import os
import re import re
import sys import sys
import types import types
from _pytest.config import get_config, PytestPluginManager import pytest
from _pytest.main import EXIT_NOTESTSCOLLECTED, Session from _pytest.config import get_config
from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import Session
@pytest.fixture @pytest.fixture

View File

@ -1,15 +1,24 @@
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
from __future__ import absolute_import, division, print_function from __future__ import absolute_import
from __future__ import division
from __future__ import print_function
import os import os
import py.path
import pytest
import sys import sys
import time import time
import py.path
import _pytest.pytester as pytester import _pytest.pytester as pytester
from _pytest.pytester import HookRecorder import pytest
from _pytest.pytester import CwdSnapshot, SysModulesSnapshot, SysPathsSnapshot
from _pytest.config import PytestPluginManager from _pytest.config import PytestPluginManager
from _pytest.main import EXIT_OK, EXIT_TESTSFAILED, EXIT_NOTESTSCOLLECTED from _pytest.main import EXIT_NOTESTSCOLLECTED
from _pytest.main import EXIT_OK
from _pytest.main import EXIT_TESTSFAILED
from _pytest.pytester import CwdSnapshot
from _pytest.pytester import HookRecorder
from _pytest.pytester import SysModulesSnapshot
from _pytest.pytester import SysPathsSnapshot
def test_make_hook_recorder(testdir): def test_make_hook_recorder(testdir):

Some files were not shown because too many files have changed in this diff Show More