pytest-pythonpath
=================
**NOTE:** This plugin is obsolete as of pytest 7.0.0. Thanks to [this PR](https://github.com/pytest-dev/pytest/pull/9134) from [Brian Okken](https://github.com/okken), you can now modify the PYTHONPATH using the `pythonpath` configuration option. See documentation here: https://docs.pytest.org/en/7.0.x/reference/reference.html#confval-pythonpath
This is a py.test plugin for adding to the PYTHONPATH from the pytests.ini file before tests run.
Installation
------------
Install with pip::
pip install pytest-pythonpath
Uninstall with pip::
pip uninstall pytest-pythonpath
Usage
-----
Add a line in your pytest.ini file with a key of `python_paths` and provide a space seperated list of paths
you want inserted to the beginning of the PYTHONPATH before any tests run:
[pytest]
python_paths = your/path/apps your/path/libs
If you'd like to have `.pth` files be processed too, use `site_dirs` instead:
[pytest]
site_dirs = your/path/apps your/path/libs
This will cause the `addsitedir` function to be called on each path instead of a simple `sys.path.insert(0, path)`.
Note that using the `site_dirs` will not place your specified paths in front of existing paths.
Once this is added to your pytest.ini, you can use the py.test command as you normally would.
Raw data
{
"_id": null,
"home_page": "https://github.com/bigsassy/pytest-pythonpath",
"name": "pytest-pythonpath",
"maintainer": "",
"docs_url": null,
"requires_python": ">=2.6, <4",
"maintainer_email": "",
"keywords": "",
"author": "Eric Palakovich Carr",
"author_email": "carreric@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/e4/2d/b7495359273a96b87528b5dcaa80fdd47524df9067ecbf5fa01776d419dc/pytest-pythonpath-0.7.4.tar.gz",
"platform": "",
"description": "pytest-pythonpath\n=================\n\n**NOTE:** This plugin is obsolete as of pytest 7.0.0. Thanks to [this PR](https://github.com/pytest-dev/pytest/pull/9134) from [Brian Okken](https://github.com/okken), you can now modify the PYTHONPATH using the `pythonpath` configuration option. See documentation here: https://docs.pytest.org/en/7.0.x/reference/reference.html#confval-pythonpath\n\nThis is a py.test plugin for adding to the PYTHONPATH from the pytests.ini file before tests run.\n\nInstallation\n------------\n\nInstall with pip::\n\n pip install pytest-pythonpath\n\nUninstall with pip::\n\n pip uninstall pytest-pythonpath\n\nUsage\n-----\n\nAdd a line in your pytest.ini file with a key of `python_paths` and provide a space seperated list of paths\nyou want inserted to the beginning of the PYTHONPATH before any tests run:\n\n [pytest]\n python_paths = your/path/apps your/path/libs\n\nIf you'd like to have `.pth` files be processed too, use `site_dirs` instead:\n\n [pytest]\n site_dirs = your/path/apps your/path/libs\n\nThis will cause the `addsitedir` function to be called on each path instead of a simple `sys.path.insert(0, path)`.\nNote that using the `site_dirs` will not place your specified paths in front of existing paths.\n\nOnce this is added to your pytest.ini, you can use the py.test command as you normally would.\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "pytest plugin for adding to the PYTHONPATH from command line or configs.",
"version": "0.7.4",
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"md5": "cb609b4fe27635d9c670019b4d410203",
"sha256": "e73e11dab2f0b83e73229e261242b251f0a369d7f527dbfec068822fd26a6ce5"
},
"downloads": -1,
"filename": "pytest_pythonpath-0.7.4-py3-none-any.whl",
"has_sig": false,
"md5_digest": "cb609b4fe27635d9c670019b4d410203",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=2.6, <4",
"size": 3660,
"upload_time": "2022-02-10T15:03:00",
"upload_time_iso_8601": "2022-02-10T15:03:00.637683Z",
"url": "https://files.pythonhosted.org/packages/77/f9/cdff595776d35031576c9be6d362a3e610e9085edf07508902c05c8896f8/pytest_pythonpath-0.7.4-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"md5": "8613c4add916c576f6216375ec97af85",
"sha256": "64e195b23a8f8c0c631fb16882d9ad6fa4137ed1f2961ddd15d52065cd435db6"
},
"downloads": -1,
"filename": "pytest-pythonpath-0.7.4.tar.gz",
"has_sig": false,
"md5_digest": "8613c4add916c576f6216375ec97af85",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=2.6, <4",
"size": 4383,
"upload_time": "2022-02-10T15:03:02",
"upload_time_iso_8601": "2022-02-10T15:03:02.058518Z",
"url": "https://files.pythonhosted.org/packages/e4/2d/b7495359273a96b87528b5dcaa80fdd47524df9067ecbf5fa01776d419dc/pytest-pythonpath-0.7.4.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2022-02-10 15:03:02",
"github": true,
"gitlab": false,
"bitbucket": false,
"github_user": "bigsassy",
"github_project": "pytest-pythonpath",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "pytest",
"specs": [
[
">=",
"2.5.2"
]
]
}
],
"lcname": "pytest-pythonpath"
}