Skip to content

pytest plugin should not be registered by default #946

@vfilimonov

Description

@vfilimonov

Hello

I suggest that the pytest plugin should not be registered by default on dash installation.

A clean install of pytest without any plugins automatically activates dash-1.3.1 plugin (which increases the time of test suite by unnecessary import of the module and also annoys with the warning).

On a clean virtual environment:

$ python3 -m venv venv
$ source venv/bin/activate
$ pip install dash
$ pip install pytest
$ mkdir tests
$ cd tests/

an empty run of pytest results in

$ pytest
/Users/user/tmp/venv/lib/python3.7/site-packages/dash/testing/plugin.py:17: UserWarning:

run `pip install dash[testing]` if you need dash.testing

===================================================================== test session starts ======================================================================
platform darwin -- Python 3.7.1, pytest-5.2.0, py-1.8.0, pluggy-0.13.0
rootdir: /Users/user/tmp/tests
plugins: dash-1.3.1
collected 0 items                                                                                                                                              

==================================================================== no tests ran in 0.00s =====================================================================

Though the pytest-dash plugin was never installed:

$ pip uninstall pytest-dash
WARNING: Skipping pytest-dash as it is not installed.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions