summaryrefslogtreecommitdiff
path: root/tests/test_venv.py
Commit message (Collapse)AuthorAgeFilesLines
* fix: don't measure all third-party packages if source is in third-party locationManuel Jacob2023-03-151-3/+23
| | | | | | | | There is logic to not measure third-party packages inside configured sources. However, when a (i.e. another) configured source was inside a third-party location, this logic was previously disabled completely. This caused a problem if a virtual env is set up inside a configured source directory and a configured source package gets installed inside the virtual env. Previously in this case, coverage was measured for all files in the virtual env for the reason described in the previous paragraph. This commit changes the code to collect all configured source directories inside third-party locations and disable coverage for code in third-party locations only if its not in one of these collected source directories.
* mypy: install pytest alongside mypy to get its typesNed Batchelder2023-01-101-1/+1
|
* mypy: test_venv.pyNed Batchelder2023-01-071-13/+18
|
* refactor: @contract is completely goneNed Batchelder2022-12-291-1/+1
|
* test: remove obsolete skipsNed Batchelder2022-12-241-7/+0
|
* build: use pyproject.toml to comply with pep517Ned Batchelder2022-09-131-1/+1
| | | | | | | | Also: remove --no-index for installing ourselves. PEP-517 compliance means we need to use PyPI to get setuptools, so we can't use --no-index anymore. I think this was added just to speed up the initial installation of the virtualenv used in these tests.
* style: parens should indent the same as their opening lineNed Batchelder2022-05-011-9/+9
|
* build: Build and test tweaks to help with cross-compilationSteve Dower2022-04-301-4/+3
| | | | | | | | | | | | | | | For context, I've been testing whether a range of popular libraries are going to work on Windows ARM64. (This requires compiling on a regular x64 machine and then copying the wheel to an ARM64 one for testing.) The good news is, coverage seems to be just fine without any changes. However, because of a few assumptions in the test suite about always testing an in-place build, I had to make some tweaks to be able to run tests. My proposed tweaks should be fine for current uses, but they also allow the following: * support `SETUPTOOLS_EXT_SUFFIX` when building to override the pyd tag on Windows (used with `setup.py build_ext -L <path>` to point at [pythonarm64](https://www.nuget.org/packages/pythonarm64/) import libraries to do the cross-compile) * allow `COVERAGE_INSTALL_ARGS` to override how the tests install coverage into a venv (allows to point at a wheel rather than rebuilding from the sources) * allow `python igor.py remove_extension --from-install` to delete the extension module from `site-packages` rather than only the source tree * other changes to allow removing the `coverage` directory from the source tree before tests so that the installed copy will be used instead. I've tested these on my own Windows ARM64 machine, though unfortunately there aren't any available on CI services yet. If you wanted to start releasing (preview) wheels for win-arm64 you can, but there's no support (yet) in `cibuildwheel` or `build` to do it (because those tools don't really have a concept of cross-compilation for Windows at all... yet ;-) ). For the linter
* test: bpo 46028 only is a problem under very specific circumstancesNed Batchelder2022-01-271-1/+6
|
* test: bpo46028 was fixed in 3.11 this weekNed Batchelder2022-01-221-1/+1
|
* refactor(test): use xfail for tests that fail on specific versions of PythonNed Batchelder2022-01-191-1/+1
|
* test: virtualenv tests are still broken on 3.11.0a4 (bpo 46028)Ned Batchelder2022-01-151-1/+1
|
* style(test): use a consistent name format for test_bug_XXX testsNed Batchelder2022-01-101-1/+1
|
* test(build): skip virtualenv tests on 3.11.0a3 (bpo 46028)Ned Batchelder2022-01-021-0/+2
| | | | | I'm hoping this will be fixed in 3.11.0a4 by https://github.com/python/cpython/pull/30144
* debug: see the output from run_in_venvNed Batchelder2021-11-211-0/+2
|
* perf(test): run pip just once, shaves 1.2s off the fixtureNed Batchelder2021-10-311-8/+9
| | | | ... though that means it's 8.1s instead of 9.3s, so still pretty slow.
* test: use the coverage-command fixture throughout the venv testsNed Batchelder2021-10-311-4/+4
|
* fix: don't warn about already imported files for namespace packages #888Ned Batchelder2021-10-311-2/+52
| | | | Ignore namespace packages in the already-imported check. #888
* refactor(test): the virtualenv tests deserve their own fileNed Batchelder2021-10-311-0/+276