Skip to content

AssertionError - ERROR: InvocationError for command '**\.tox\py35\Scripts\python' '**\PyCharm Community Edition 2019.2\helpers\pycharm\pytestrunner.py' -p pytest_teamcity tests (exited with code 1) #5800

Closed
@sanghvibk

Description

@sanghvibk
  • a detailed description of the bug or suggestion
    While running tox command from PyCharm (version 2019.2) and PyTest (version 5.1.1), I am getting an error "AssertionError - ERROR: InvocationError for command '.tox\py35\Scripts\python' '\PyCharm Community Edition 2019.2\helpers\pycharm\pytestrunner.py' -p pytest_teamcity tests (exited with code 1)". I was able to resolve this issue by forcing tox to use PyTest version 5.0.1 OR 4.6.2. I managed to find source of exception in file **.tox\py35\lib\site-packages_pytest\config_init_.py - line 920 - "assert self.invocation_params.args == args"

  • output of pip list from the virtual environment you are using

Package Version
atomicwrites 1.3.0
attrs 19.1.0
colorama 0.4.1
filelock 3.0.12
importlib-metadata 0.19
more-itertools 7.2.0
packaging 19.1
pathlib2 2.3.4
pip 19.2.3
pluggy 0.12.0
py 1.8.0
pyparsing 2.4.2
pytest 5.1.1
setuptools 41.2.0
six 1.12.0
toml 0.10.0
tox 3.13.2
virtualenv 16.7.4
wcwidth 0.1.7
zipp 0.6.0
  • pytest and operating system versions
    pytest - 5.1.1 / OS version : latest version of Windows 10 Home as well as latest version of Raspbian

  • example of tox.ini having issue with ...
    tox.ini file is like ...

[tox]
envlist = py{35}

[testenv]
basepython =
    py35: python3.5
deps =
    check-manifest
    # If your project uses README.rst, uncomment the following:
    # readme_renderer
    flake8
    pytest
commands =
    check-manifest --ignore tox.ini,tests*
    # This repository uses a Markdown long_description, so the -r flag to
    # `setup.py check` is not needed. If your project contains a README.rst,
    # use `python setup.py check -m -r -s` instead.
    python setup.py check -m -s
    flake8 .
    py.test tests
[flake8]
    exclude = .tox,*.egg,build,data
    select = E,W,F
  • example of tox.ini NOT having this issue ...
    tox.ini file is like ...
[tox]
envlist = py{35}

[testenv]
basepython =
    py35: python3.5
deps =
    check-manifest
    # If your project uses README.rst, uncomment the following:
    # readme_renderer
    flake8
    pytest==5.0.1
commands =
    check-manifest --ignore tox.ini,tests*
    # This repository uses a Markdown long_description, so the -r flag to
    # `setup.py check` is not needed. If your project contains a README.rst,
    # use `python setup.py check -m -r -s` instead.
    python setup.py check -m -s
    flake8 .
    py.test tests
[flake8]
    exclude = .tox,*.egg,build,data
    select = E,W,F

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: needs informationreporter needs to provide more information; can be closed after 2 or more weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions