from pyrsistent import *

from .results import *
from .tox import *


res = {
    "../lib2": DependentResult(
        url="../lib2",
        suite_runs=[
            ToxSuiteRun(
                suite=TestSuiteRun(
                    errors=0,
                    failures=1,
                    skipped=0,
                    tests=2,
                    time="0.049",
                    timestamp=datetime.datetime(2019, 9, 9, 17, 47, 39, 907527),
                    hostname="fornax",
                    name="pytest",
                    test_cases=[
                        TestCaseRun(
                            name="test_two",
                            classname="tests.test_lib2",
                            file="tests/test_lib2.py",
                            line=3,
                            time="0.000",
                            failure=None,
                        ),
                        TestCaseRun(
                            name="test_three",
                            classname="tests.test_lib2",
                            file="tests/test_lib2.py",
                            line=7,
                            time="0.000",
                            failure=Failure(
                                message="TypeError: add() takes 2 positional arguments but 3 were given",
                                lines=[
                                    "def test_three():\n>       assert lib2.app.add_args([1, 2, 3]) == 6\n\ntests/test_lib2.py:9: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nargs = [1, 2, 3]\n\n    def add_args(args: t.List[int]) -> int:\n>       return lib1.app.add(*args)\nE       TypeError: add() takes 2 positional arguments but 3 were given\n\nsrc/lib2/app.py:7: TypeError"
                                ],
                            ),
                        ),
                    ],
                ),
                tox_run=ToxRun(
                    toxversion="3.14.0",
                    commands=pvector([]),
                    platform="linux",
                    host="fornax",
                    testenvs={
                        "py37": TestEnv(
                            test=[
                                Test(
                                    retcode=1,
                                    output="============================= test session starts ==============================\nplatform linux -- Python 3.7.3, pytest-5.1.2, py-1.8.0, pluggy-0.12.0 -- /tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/.tox/py37/bin/python\ncachedir: .tox/py37/.pytest_cache\nhypothesis profile 'default' -> database=DirectoryBasedExampleDatabase('/tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/.hypothesis/examples')\nrootdir: /tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c, inifile: setup.cfg, testpaths: tests\nplugins: hypothesis-4.35.0, cov-2.7.1, sugar-0.9.2, clarity-0.2.0a1\ncollecting ... collected 2 items\n\ntests/test_lib2.py::test_two PASSED                                      [ 50%]\ntests/test_lib2.py::test_three FAILED                                    [100%]\n\n=================================== FAILURES ===================================\n__________________________________ test_three __________________________________\n\n    def test_three():\n>       assert lib2.app.add_args([1, 2, 3]) == 6\n\ntests/test_lib2.py:9: \n_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ \n\nargs = [1, 2, 3]\n\n    def add_args(args: t.List[int]) -> int:\n>       return lib1.app.add(*args)\nE       TypeError: add() takes 2 positional arguments but 3 were given\n\nsrc/lib2/app.py:7: TypeError\n----------- generated xml file: /tmp/tmpg23dh633/py37/test_py37.xml ------------\n=========================== short test summary info ============================\nFAILED tests/test_lib2.py::test_three - TypeError: add() takes 2 positional a...\n========================= 1 failed, 1 passed in 0.05s ==========================\n",
                                    command=pvector(
                                        [
                                            "/home/adam/.local/bin/poetry",
                                            "run",
                                            "pytest",
                                        ]
                                    ),
                                )
                            ],
                            installed_packages=pvector(
                                [
                                    "WARNING: Could not find setup.py for directory /tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/src (tried all parent directories)",
                                    "01d61084-d29e-11e9-96d1-7c5cf84ffe8e==0.1.0",
                                    "alabaster==0.7.12",
                                    "ansicolors==1.0.2",
                                    "appdirs==1.4.3",
                                    "argh==0.26.2",
                                    "aspy.yaml==1.3.0",
                                    "astroid==2.2.5",
                                    "atomicwrites==1.3.0",
                                    "attrs==19.1.0",
                                    "Babel==2.7.0",
                                    "black==18.9b0",
                                    "bleach==3.1.0",
                                    "bump2version==0.5.11",
                                    "certifi==2019.6.16",
                                    "cfgv==2.0.1",
                                    "chardet==3.0.4",
                                    "Click==7.0",
                                    "coverage==4.5.4",
                                    "cuvner==18.0.1",
                                    "docshtest==0.0.2",
                                    "docutils==0.15.2",
                                    "-e git+/home/adam/Documents/checkon/../lib2@f677f7f5975822643abfd327b66daf4281f5b52c#egg=e5fda7ba_d2a1_11e9_96d1_7c5cf84ffe8e",
                                    "filelock==3.0.12",
                                    "hypothesis==4.35.0",
                                    "identify==1.4.7",
                                    "idna==2.8",
                                    "imagesize==1.1.0",
                                    "importlib-metadata==0.20",
                                    "incremental==17.5.0",
                                    "isort==4.3.21",
                                    "Jinja2==2.10.1",
                                    "lazy-object-proxy==1.4.2",
                                    "MarkupSafe==1.1.1",
                                    "mccabe==0.6.1",
                                    "more-itertools==7.2.0",
                                    "nodeenv==1.3.3",
                                    "packaging==19.1",
                                    "pathtools==0.1.2",
                                    "pkginfo==1.5.0.1",
                                    "pluggy==0.12.0",
                                    "pre-commit==1.18.3",
                                    "py==1.8.0",
                                    "Pygments==2.4.2",
                                    "pylint==2.3.1",
                                    "pyparsing==2.4.2",
                                    "pytest==5.1.2",
                                    "pytest-clarity==0.2.0a1",
                                    "pytest-cov==2.7.1",
                                    "pytest-sugar==0.9.2",
                                    "pytz==2019.2",
                                    "PyYAML==5.1.2",
                                    "readme-renderer==24.0",
                                    "requests==2.22.0",
                                    "requests-toolbelt==0.9.1",
                                    "six==1.12.0",
                                    "snowballstemmer==1.9.1",
                                    "Sphinx==2.2.0",
                                    "sphinx-rtd-theme==0.4.3",
                                    "sphinxcontrib-applehelp==1.0.1",
                                    "sphinxcontrib-devhelp==1.0.1",
                                    "sphinxcontrib-htmlhelp==1.0.2",
                                    "sphinxcontrib-jsmath==1.0.1",
                                    "sphinxcontrib-qthelp==1.0.2",
                                    "sphinxcontrib-serializinghtml==1.1.3",
                                    "termcolor==1.1.0",
                                    "toml==0.10.0",
                                    "tox==3.14.0",
                                    "tqdm==4.35.0",
                                    "twine==1.14.0",
                                    "typed-ast==1.4.0",
                                    "unidiff==0.5.5",
                                    "urllib3==1.25.3",
                                    "virtualenv==16.7.5",
                                    "watchdog==0.9.0",
                                    "wcwidth==0.1.7",
                                    "webencodings==0.5.1",
                                    "wrapt==1.11.2",
                                    "zipp==0.6.0",
                                ]
                            ),
                            python=Python(
                                is_64=True,
                                version_info=(3, 7, 3, "final", 0),
                                executable="/tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/.tox/py37/bin/python",
                                name="python",
                                sysplatform="linux",
                                version="3.7.3 (default, May 21 2019, 16:20:48) \n[GCC 7.3.0]",
                            ),
                            setup=[
                                Setup(
                                    retcode=0,
                                    output="WARNING: Could not find setup.py for directory /tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/src (tried all parent directories)\n01d61084-d29e-11e9-96d1-7c5cf84ffe8e==0.1.0\nalabaster==0.7.12\nansicolors==1.0.2\nappdirs==1.4.3\nargh==0.26.2\naspy.yaml==1.3.0\nastroid==2.2.5\natomicwrites==1.3.0\nattrs==19.1.0\nBabel==2.7.0\nblack==18.9b0\nbleach==3.1.0\nbump2version==0.5.11\ncertifi==2019.6.16\ncfgv==2.0.1\nchardet==3.0.4\nClick==7.0\ncoverage==4.5.4\ncuvner==18.0.1\ndocshtest==0.0.2\ndocutils==0.15.2\n-e git+/home/adam/Documents/checkon/../lib2@f677f7f5975822643abfd327b66daf4281f5b52c#egg=e5fda7ba_d2a1_11e9_96d1_7c5cf84ffe8e\nfilelock==3.0.12\nhypothesis==4.35.0\nidentify==1.4.7\nidna==2.8\nimagesize==1.1.0\nimportlib-metadata==0.20\nincremental==17.5.0\nisort==4.3.21\nJinja2==2.10.1\nlazy-object-proxy==1.4.2\nMarkupSafe==1.1.1\nmccabe==0.6.1\nmore-itertools==7.2.0\nnodeenv==1.3.3\npackaging==19.1\npathtools==0.1.2\npkginfo==1.5.0.1\npluggy==0.12.0\npre-commit==1.18.3\npy==1.8.0\nPygments==2.4.2\npylint==2.3.1\npyparsing==2.4.2\npytest==5.1.2\npytest-clarity==0.2.0a1\npytest-cov==2.7.1\npytest-sugar==0.9.2\npytz==2019.2\nPyYAML==5.1.2\nreadme-renderer==24.0\nrequests==2.22.0\nrequests-toolbelt==0.9.1\nsix==1.12.0\nsnowballstemmer==1.9.1\nSphinx==2.2.0\nsphinx-rtd-theme==0.4.3\nsphinxcontrib-applehelp==1.0.1\nsphinxcontrib-devhelp==1.0.1\nsphinxcontrib-htmlhelp==1.0.2\nsphinxcontrib-jsmath==1.0.1\nsphinxcontrib-qthelp==1.0.2\nsphinxcontrib-serializinghtml==1.1.3\ntermcolor==1.1.0\ntoml==0.10.0\ntox==3.14.0\ntqdm==4.35.0\ntwine==1.14.0\ntyped-ast==1.4.0\nunidiff==0.5.5\nurllib3==1.25.3\nvirtualenv==16.7.5\nwatchdog==0.9.0\nwcwidth==0.1.7\nwebencodings==0.5.1\nwrapt==1.11.2\nzipp==0.6.0\n",
                                    command=pvector(
                                        [
                                            "/tmp/checkon/f677f7f5975822643abfd327b66daf4281f5b52c/.tox/py37/bin/python",
                                            "-m",
                                            "pip",
                                            "freeze",
                                        ]
                                    ),
                                )
                            ],
                        )
                    },
                    reportversion="1",
                ),
            )
        ],
    )
}
