Commit Graph

70 Commits

Author SHA1 Message Date
Frost Ming 904f0a3b86 capture outputs written in subprocesses 2021-08-03 10:41:19 +08:00
Frost Ming 443547fee5 show 10 slowest cases 2021-08-03 10:41:17 +08:00
Frost Ming 46ea38fcca Isolate environment variables 2021-08-03 10:41:17 +08:00
Frost Ming a82bbb7b27 Try switching from delegator to subprocess 2021-07-28 16:39:36 +08:00
Frost Ming ca5d931f1f Update to py36 plus syntax 2021-07-28 10:59:00 +08:00
Frost Ming 698ef8cdd2 improve test performance 2020-11-02 11:11:57 +08:00
Frost Ming e6edaa6977 Disable ssh check 2020-11-02 11:11:56 +08:00
Dan Ryan c7425e7508 Skip tests that build extensions on windows
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-05-09 10:55:01 -04:00
Dan Ryan c19435e6da Fix relative path issue during tests
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-28 11:47:16 -04:00
Dan Ryan 73edea10a0 Skip flaky test
Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-22 17:28:19 -04:00
Dan Ryan e03878d7c7 Add news entry and fix lockfile
- Drop pytest-tap
- Update azure pipelines config
- Borrow ramdisk configuration from pip
- Fix pyinstaller ref for python 2
- Add 0-minute timeout and add github workflow
- Add skip for pywin32
- Scale down to `-n auto` to reduce race conditions on windows
- Skip pywin32 on python 3.8 as the relevant dependencies aren't
  compatible
- Use default pip exists action = ignore to work around VCS race
  condition
- Create local temp directory to avoid crossing drive letter boundary on
  azure during CI runs
- Monkeypatch click windows console detection to return False in CI

Signed-off-by: Dan Ryan <dan.ryan@canonical.com>
2020-04-10 12:14:06 -04:00
frostming 7d36f3fbda Reformat codes 2019-09-06 18:06:05 +08:00
Dan Ryan 8abaa06c23 Remove extraneous exception added to conftest.py
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-06 01:02:16 -04:00
Dan Ryan 9c3ee2a72b Get rid of devpi
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-07-05 02:55:47 -04:00
Dan Ryan 4b75c6490d Fix devpi server to work on windows
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 23:52:49 -04:00
Dan Ryan edbb6321f4 Add windows support to test devpi server
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 17:25:18 -04:00
Dan Ryan 83868c8f1a Cut over to devpi for tests and improve logging
- Verbose logs will now write gracefully to the terminal even while the
  spinner is running (i.e. during locking)
- This PR also cuts over to Devpi for a backing cache rather than a
  hacked httpbin instance
- Inclues a refactor of `pip_install` to deduplicate logic
- Attempts to switch back to relying on native editable installs in pip
  as the current implementation is broken on master (i.e. nothing is
  installed in the virtualenv)
- Fixes #3809

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-25 01:26:49 -04:00
Dan Ryan b4d6ea5236 Fix environment check
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-17 15:25:18 -04:00
Dan Ryan e7536ab1f6 Fix version comparisons in do_outdated
- Fix comparisons between post-release and non-post-release versions
- Update `pip_shims` to accommodate new pip versions
- Implement syntax changes in `environment.py` to account for new pip
  syntax
- Add `required` version output to `pipenv update --outdated`
- Add pipfile version pin information as well, if available

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-16 23:06:37 -04:00
Dan Ryan 359906c669 Update tests to resolve some transient resolution issues
Signed-off-by: Dan Ryan <dan@danryan.co>

probably need to sync submodules for this to work

Signed-off-by: Dan Ryan <dan@danryan.co>

Update to new version of artifacts

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix windows failure

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure-pipelines.yml for Azure Pipelines

Update lockfile test for windows

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix scandir test

Signed-off-by: Dan Ryan <dan@danryan.co>

Update azure test steps

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python discovery when nothing is supplied

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix cli ensure_project call

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix run in virtualenv test

Signed-off-by: Dan Ryan <dan@danryan.co>

Show why virtualenv test failed if it did

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix python interpreter discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

scale down lock test modifications and increase error logging

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix spinner bugs on windows and python discovery

Signed-off-by: Dan Ryan <dan@danryan.co>

Fix pythonfinder search algorithm to dodge false paths on win

Signed-off-by: Dan Ryan <dan@danryan.co>

use pipenv directly

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-06-03 22:01:07 -04:00
Dan Ryan 7d0b0f6632 Merge branch 'master' into conftest-checks-ignore-KeyboardInterrupt 2019-05-26 17:05:53 -04:00
Dan Ryan c23e57b482 Fix test and pipeline definitions
- Update extras name in pipelines
- fix windows virtualenv calls
- don't write debug info during virtualenv creation and just move on
- Generalize some pipelines
- Use quotes around evaluated statements in pipeline
- Fix envvar references
- Update vistir:
  - fix stream wrapper on windows
  - fix ICACLS permissions handler
  - fix path normalization function
- Update azure venv creation script
- Fix vendoring script

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-18 23:22:53 -04:00
Dan Ryan d8e66c7fce Add future imports to tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-05-16 00:52:10 -04:00
Dan Ryan e3bf42e57e Merge remote-tracking branch 'origin/master' into update-vendored-deps 2019-05-15 20:39:44 -04:00
Miro Hrončok 6152199752 Pytest 4: Update to get_closest_marker
See https://docs.pytest.org/en/latest/mark.html#update-marker-code
2019-05-03 12:23:33 +02:00
Dan Ryan ff4c8b0d5c Update vendored deps
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-04-18 13:50:48 -04:00
John Vandenberg 8e584055cf conftest.py: Ignore KeyboardInterrupt
During check_internet() and check_github_ssh(), a KeyboardInterrupt
should be interpreted as user desire to escape the check, not escape
the entire test run.  This is especially true during check_github_ssh
which may require a passphrase from the user, which they might feel
uncomfortable giving during a test suite.

After these checks are bypassed, there is user feedback indicating the
tests are running, and so they can trigger KeyboardInterrupt again if
they wish to escape the entire test run.
2019-04-03 10:19:00 +07:00
Dan Ryan 92010826c8 Erm, remove verbose mode from tests
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-24 15:58:10 -04:00
Dan Ryan 32e918fd46 Don't print extra strings to stdout
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-24 14:49:15 -04:00
Dan Ryan 6971468f02 Write resolution results to temp json file instead of stdout
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-24 13:10:17 -04:00
Dan Ryan a960990103 fix double declaration of kwarg
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-23 22:36:03 -04:00
Dan Ryan 4a0b2b759a monkeypatch shutil.rmtree for tests
Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-03-23 21:59:44 -04:00
Dan Ryan 466fcc0a2a Fix test skip
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:51 -04:00
Dan Ryan 73129d8401 Fix internet connectivity test
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:50 -04:00
Dan Ryan 8fdc589d05 Fix test skip
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-03-16 15:10:50 -04:00
Dan Ryan b0ba9a8766 Update syntax for context manager virtualenv test class
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 14:23:18 -05:00
Dan Ryan 090619a6a1 Fix virtualenv tempdir lifespan
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-23 13:11:32 -05:00
Dan Ryan 3bc48f034f Fix venv with leading dash test on windows and clean up tests
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-21 22:18:00 -05:00
Dan Ryan 9340ddb962 Update tests to rectify issues
Signed-off-by: Dan Ryan <dan@danryan.co>
2019-02-20 02:38:02 -05:00
Dan Ryan 19f2ee61e9 Update resolver to handle all resolution in venv
- Resolve all VCS and non-piptools-resolveable deps in venv
- Implement pep517 for resolution of non-setuptools builds
- Add full support for the new dependency link format
- Fix breakages from pip 19* rollout and subsequent setuptools breakage

Signed-off-by: Dan Ryan <dan.ryan@xyleminc.com>
2019-02-11 00:48:35 -05:00
Dan Ryan eae3958227 Fix pep508 direct URL depedencies
- Fixes #3148

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-27 02:06:40 -05:00
Dan Ryan 574fe7308d Update all vendored dependencies
- Clean up test config and environment variable handling
- Unset env var changes performend by `pipenv run`
- Make `environments.is_in_virtualenv()` more dynamic -- read
  environment on the fly
- Split up tests on `pipenv run` to reduce complexity -- one test for
  global run (no virtualenv creation), one test for virtualenv creation
- Add `warn_in_virtualenv` call to `run` command, why doesn't click
  invoke this automatically?

Signed-off-by: Dan Ryan <dan@danryan.co>
2019-01-21 19:05:25 -05:00
Frost Ming 9dab05d64e Update the index names in lock file 2019-01-17 12:04:05 +08:00
jxltom 85e64b86be Resort imports for tests 2018-12-01 17:26:32 +08:00
Dan Ryan a3b5e8f374 Fix local serving of static resource fixtures
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-22 17:05:57 -05:00
Dan Ryan feab1aed39 Fix failures from missing pipfile before install
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-20 11:27:31 -05:00
Dan Ryan c8c78931f5 Merge branch 'master' into bugfix/3249 2018-11-19 12:20:09 -05:00
Dan Ryan 45e9f6e417 Fix parsing of markers in VCS requirements
- Parsing of markers in non-editable vcs requirements was broken
- This PR adds some VCS repos, some utility pipfile generation functions
  and some fixture helpers
- Fixes #3249

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-11-18 23:49:57 -05:00
Frost Ming 32f5d85b0b Pop VIRTUAL_ENV env
Signed-off-by: Frost Ming <mianghong@gmail.com>
2018-11-17 19:42:43 +08:00
Frost Ming 915b3c1334 ignore PIPENV_ACTIVE in testing
Signed-off-by: Frost Ming <mianghong@gmail.com>
2018-11-17 18:23:28 +08:00