Commit Graph

361 Commits

Author SHA1 Message Date
Dan Ryan cf3c561100 Pass environment to subprocess
- `check_output` needs to pass `PYTHONIOENCODING` to `Popen` on python2

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-12 19:41:01 -04:00
Tzu-ping Chung 5b2db86fa9 Add a trivial test for help 2018-04-13 00:10:45 +08:00
Tzu-ping Chung d8b1d637e0 Missed path fix 2018-04-12 18:11:59 +08:00
Tzu-ping Chung 9d83f6d8e0 Fix Windows test marker 2018-04-12 18:06:46 +08:00
Tzu-ping Chung 60a48c0436 Inject environs in another way 2018-04-12 18:03:36 +08:00
Tzu-ping Chung fabaa4955f Mock finalize 2018-04-12 18:01:43 +08:00
Tzu-ping Chung f730dd4899 Fix relative paths in tests 2018-04-12 17:48:53 +08:00
Tzu-ping Chung cde60ca58c Fix import 2018-04-12 17:47:54 +08:00
Tzu-ping Chung 4533e68bca Move things around 2018-04-12 17:35:17 +08:00
Tzu-ping Chung 1dea2a27b2 Project cannot be a fixture 2018-04-12 17:34:03 +08:00
Tzu-ping Chung 92cc570588 Split up tests in test_pipenv
All tests are intact. I only move them around.

PipenvInstance is turned into a fixture to be used across files.
needs_internet is turned into a marker to be used across files.
2018-04-12 17:05:17 +08:00
Tzu-ping Chung 0e8e7ef0c4 Split up tests in test_utils 2018-04-12 15:01:12 +08:00
Dan Ryan 337302b165 Merge branch 'master' into bugfix/windows-venv-name 2018-04-11 13:52:39 -04:00
Dan Ryan 219d20faca Merge branch 'test-fixes' of github.com:pypa/pipenv into test-fixes 2018-04-10 23:38:25 -04:00
Dan Ryan 620411a924 Equilize test runtimes
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-10 23:37:55 -04:00
Dan Ryan 6dd068eeb2 Merge branch 'master' into test-fixes 2018-04-10 23:29:14 -04:00
Dan Ryan 4acf3f3d84 Merge branch 'master' of github.com:pypa/pipenv into test-fixes 2018-04-10 21:26:15 -04:00
Frost Ming b9bd4835ee Improve according to comments 2018-04-10 20:39:51 +08:00
frostming 4b290407d3 only change things on way in 2018-04-10 19:47:44 +08:00
frostming fc17c757de test preserve comments 2018-04-10 19:47:44 +08:00
Frost Ming cd28874469 add tests
fix the broken `items()`

Fix test cases

Keep contoml untouched
2018-04-10 19:47:44 +08:00
Dan Ryan e3f8d4fded Final changes and tests for case normalization
- Fix windows venv case normalization

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-10 00:21:07 -04:00
Dan Ryan 31c9de2214 Split python2 and python3
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-08 17:47:35 -04:00
Tzu-ping Chung e46cabcb2c Fix Python version parser for 2.7.0
Fix #1893.
2018-04-08 17:23:17 +08:00
Dan Ryan 0b057c5631 Alter tests for python 3 markers
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-07 23:09:50 -04:00
Dan Ryan a834505799 test speedups
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-07 22:20:16 -04:00
Dan Ryan 50f06289cc Minor test changes
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-07 19:10:21 -04:00
Dan Ryan 9f45351113 Move install test to normal job and fix backport
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-07 18:16:30 -04:00
Tzu-ping Chung c054d2ae94 Skip test_complex_lock_deep_extras 2018-04-07 22:13:33 +08:00
Tzu-ping Chung f2bfc96baf Come on 2018-04-07 21:42:36 +08:00
Tzu-ping Chung ab44596c9a Skip test_complex_lock 2018-04-07 19:23:47 +08:00
Tzu-ping Chung fa3934ac0d Cherry-pick changes from #1909
Let's hope this works.
2018-04-07 18:34:55 +08:00
Dan Ryan 1ec8dafc34 Only run tests once each
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-06 23:26:36 -04:00
Tzu-ping Chung 483bf175cf Rework cmdparse.Script API
The API now requires a command argument from signature. Parsing errors
(no command from input) is thrown as a custom exception, and caught by
the outmost possible invocation to emit a message from click.
2018-04-06 23:26:36 -04:00
Tzu-ping Chung d1eeeced45 Apply script parsing fix from pypi/pipenv#1909 2018-04-06 23:26:35 -04:00
Dan Ryan 61418fda20 Fix all tests and split out requirements refactor
- includes missing artifacts
- fixes cmdprse script
- Remove extraneous changes
- Fix tests
2018-04-06 23:25:37 -04:00
Tzu-ping Chung a536da4e6c Mock more dependencies
- Mock dateparser for maya
- Dot in PyPI package name becomes dash
- Mock regex for maya
2018-04-06 23:25:15 -04:00
Dan Ryan 703776fc92 Fix tests and requirements parsing
- Fix zip urls and markers
- Mock maya dependencies

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-06 23:24:18 -04:00
Tzu-ping Chung 536efd2d38 Fix edge cases for pipenv run
- Use os.path.join instead of os.path.sep.join
- This prevents strange test errors when there are slashes in either parts
- Better test reporting
- Cleanup
2018-04-06 23:23:17 -04:00
Dan Ryan 1607091b85 Begin complete re-work of requirements parsing
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-06 23:23:16 -04:00
Tzu-ping Chung b4e832fb73 Improve test error report 2018-04-06 23:23:16 -04:00
Tzu-ping Chung 9dda593650 Improve python 2 cmdparse compatibility
- Use string_types to improve compat on Python 2
- Correct PYTHON_VERSION in appveyor.yml
- Let's debug
2018-04-06 23:22:30 -04:00
Dan Ryan d3a08878cf Fix marker parsing
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-06 23:22:30 -04:00
Tzu-ping Chung 15c7308ca9 Proper script argument escaping
I chose to make Script.parse to always operate in POSIX mode so it is much
easier to write commands compatible on all platforms.

Script.cmdify is the important part on Windows. It ensures the argument
line is always escaped and joined properly on Windows, not just for the
subset that works both under POSIX and Windows (as is the case of
shlex.escape).
2018-04-06 23:22:30 -04:00
Dan Ryan 31301b1536 Fix deps and testing infrastructure
- Fix requirement parsing
- Add appveyor config
- cutover from pathlib to pathlib2 if needed
- Pin pathlib2==2.1.0 to avoid scandir
- Windows script runner fix
- Backport `shlex.quote()` for use in `pipenv run`
- Update tests and appveyor

Signed-off-by: Dan Ryan <dan@danryan.co>
2018-04-06 23:19:32 -04:00
Dan Ryan ff15be72c5 Remove verbose flag auto-add
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-03-30 18:27:25 -04:00
Dan Ryan f9ce022794 Tweeak pypi mock
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-03-30 18:25:42 -04:00
Dan Ryan 61ce755229 Add missing artifacts
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-03-30 18:15:44 -04:00
Dan Ryan 5d3bb0768d Unmock ibm-db-sa
Signed-off-by: Dan Ryan <dan@danryan.co>
2018-03-30 17:54:52 -04:00
Dan Ryan 4551d2b68c Fix verbose command construction 2018-03-30 16:36:19 -04:00