Commit Graph

198 Commits

Author SHA1 Message Date
kennethreitz e16a19eece remove bunk test
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-20 07:53:18 -05:00
luz.paz 06f3b1a291 MIsc. comment and doc typos
Found via `codespell -q 3 --skip="./patched"`
reverted
2018-02-18 13:58:14 -05:00
Dan Ryan 7fb93b699b Comment and divide out tests for requirements 2018-02-11 04:05:32 -05:00
Dan Ryan 92e58fe97e Allow tests with PermissionErrors to pass 2018-02-04 22:27:18 -05:00
Dan Ryan eea5d57b9f Fix VCS requirement generation
- Fixes issues when turning vcs lines into requirements
- At some point there was a regression around this which treats them as
normal paths
- This now follows pip practices as well
- Big todo: clean up duplicate functionality / break out logic for
requirements parsing
- Adds regression test for this case
2018-02-04 22:27:10 -05:00
Daniel Watkins 3ff0b6f549 Explicitly cause dependency resolution failure in the test
This also moves to using projects that are more closely related to this
one as the examples.
2018-02-04 22:25:45 -05:00
Daniel Watkins 88e72d56d1 Make test assertions match the test name more closely
This updates
test_editable_vcs_install_in_pipfile_with_dependency_resolution_doesnt_traceback
to check (a) that dependency resolution was triggered, and (b) that
there was no traceback (rather than just the specific traceback we are
currently seeing).
2018-02-04 22:25:45 -05:00
Daniel Watkins 6e811dc7a2 Add test that reproduces #1240 2018-02-04 22:25:44 -05:00
Dan Ryan bc5bb39020 More thorough checks before resolving files
- Fixes #1225
- Add checks for Wheel files and archive files specifically
- Adopts egg-fragment parsing for local file paths to allow naming of
filesystem paths as well
- Adds these checks both to the get_requirement() function and the
is_installable_file() function
2018-02-04 22:25:44 -05:00
Dan Ryan b9feb06f59 Properly parse urls as Link objects
- Fixes #1121
- Adds a bunch of tests for pipenv.utils.get_requirement()
2018-02-04 22:25:42 -05:00
kennethreitz 35629babb0 fix legacy tests
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-04 14:23:05 -05:00
kennethreitz 9c4482649b fix tests
Signed-off-by: Kenneth Reitz <me@kennethreitz.org>
2018-02-04 14:19:07 -05:00
Nate Prewitt 72081cca22 Merge pull request #1363 from pypa/hotfix/1097_remerge
#1097 remerge
2018-01-27 16:51:13 -08:00
Dan Ryan 9e8d03970a Update test assertions for proper path casing
- Aligns tests with #1221 on windows
2018-01-27 13:08:34 -05:00
Tzu-ping Chung e73d2bfa17 Force Windows local drive names to uppercase
Windows generally use upper cased drive names, but allow (without
normalizing) lower cased names in cmd.exe, which results in
inconsistencies when hashing the full path (to get the name of the
project's virtualenv). Python does not provide a good solution[*], so we
need to roll our own.

[*]: Python does have os.path.normcase(), but it always converts the
     whole paths to lowercase. This would break virtually *all* existing
     virtualenvs for Windows users.

UNC host names (which Python also treats as drives), on the other hand,
can actually be either cased. I am not sure if they are case-sensitive,
or should be coerced to what case, so this patch keeps with the existing
behaviour, and does not try to coerce them.
2018-01-27 03:20:35 -05:00
Dan Ryan c92693c14f Undo all the cleanup, fix tests 2018-01-27 02:32:15 -05:00
Dan Ryan 0d622b219d Test --system flag 2018-01-27 02:12:56 -05:00
Dan Ryan a86a6fe49d Add docker pin to test to fix resolver error 2018-01-26 02:47:47 -08:00
Dan Ryan 0f04e5708c Fix backup resolver
- Backup resolver was broken when hash resolution was split out into two
functions
- This PR returns the resolver to the caller function
- This is for edge cases where the PyPI json API and the pip resolver
don't return the same authoritative result for a package lookup (a name
can be resolved in one source but not the other)
- Added test to prevent future regression
- Fixes #1195
2018-01-26 02:46:30 -08:00
Dan Ryan aac675235e Fix test typo 2017-12-08 20:30:24 -05:00
Dan Ryan 6c66f96cac Add failing windows test 2017-12-08 18:54:08 -05:00
Dan Ryan 52d21c05f4 Exclude dev packages from installs by default
- Fixes #1172
- Regression introduced in 6e7dd14
- Add test to prevent future regressions
- Update history
2017-12-06 22:42:24 -05:00
Nate Prewitt 3248698903 Merge pull request #1114 from techalchemy/bugfix/1111-sequential-editable-installs
Do sequential installs on editable dependencies
2017-12-04 08:16:18 -08:00
Nate Prewitt d122401869 Merge pull request #1098 from techalchemy/bugfix/1079-shallow-editable-installs
Stop excluding files from package list...
2017-12-04 07:53:20 -08:00
Nate Prewitt 3c80c3c81f Merge pull request #1038 from vphilippon/do-not-pin-candidate
Dependency resolution - Do not pin candidates on first selection
2017-12-03 13:27:53 -08:00
Dan Ryan c92e331cc8 Stop excluding files from package list...
- Fixes #1079 and #909
- Need to exclude non-editable file/path/URI deps from the list we give
to pip-tools
- We should really separate this logic from the logic that supplies what
is supposed to be a list of packages
Add tests and comments to prevent regression
- Ensure we resolve install_requires from local setup.py files
- Squash commits
2017-12-01 18:58:59 -05:00
Dan Ryan 6e7dd14cd3 Refactor do_install lockfile splitting
- Break out functions to split file and sections
- Break out function to merge dependencies
2017-11-30 11:45:43 -05:00
Dan Ryan 3ac8b89a83 Do sequential installs on editable dependencies
- Fixes #1111
- Uses existing infrastructure to add editable dependencies to the list
of sequentially installed packages
- Only alters functions used for this purpose
- Essentially there is a race condition because multiple editors are
trying to write to lib/site-packages/easy-install.pth for local editable
packages, so they overwrite one another
2017-11-30 11:45:40 -05:00
Dan Ryan c9ae3708ff Only strip VCS prefix for URIs with vcs+ patterns
- Fixes #1126
- Does a simple check before stripping the VCS prefix on
a requirement.uri in pipenv.utils.convert_deps_from_pip
2017-11-27 12:09:19 -05:00
Delirious Lettuce 6cbd38f46d Fix typos:
`resursively` | `recursively`
  `additonal` | `additional`
  `occured` | `occurred`
  `vulnerabilties` | `vulnerabilities`
  `gven` | `given`
  `pipenev` | `pipenv`
  `requirments` | `requirements`
  `virtualenvrionment` | `virtualenvironment`
  `envrionment` | `environment`
  `dependecies` | `dependencies`
  `requiments` | `requirements`
  `Seperated` | `Separated`
  `bugifx` | `bugfix`
  `supression` | `suppression`
  `intall` | `install`
  `Suport` | `Support`
  `autocurrections` | `autocorrections`
  `coccurency` | `concurrency`
  `consistient` | `consistent`
  `saftey` | `safety`
  `afer` | `after`
  `configuraable` | `configurable`
  `remporary` | `temporary`
  `depdendencies` | `dependencies`
  `pactched` | `patched`
2017-11-26 23:26:24 -07:00
Vincent Philippon eb40f6f892 Test confirming that deep extras resolves works 2017-11-23 01:52:58 -05:00
Vincent Philippon 8b7af50d33 Test causing a change of candidate in locking iteration. 2017-11-23 01:52:58 -05:00
Dan Ryan 35d5457823 Add tests for local package extras
- Will be even more complete with #1098
2017-11-19 20:49:49 -05:00
Dan Ryan 7f26c16102 Update test to not test for anything like cli arg
- Use a clearly unparseable package name instead
2017-11-15 19:05:00 -05:00
Dan Ryan 28907ef29c Stop writing unparseable requirements to Pipfiles
- Add better exception handling and error messaging for parse errors
- Add test to verify this is now being handled correctly
- Fixes #1056
2017-11-14 21:11:11 -05:00
Dan Ryan 2b1e1607f3 Fix missing commit from tests
* everything else is good to go (verified)
* Fixes #949, #939, #817, #914, #1012, #1028, #1025, #960, #1043, #1045
2017-11-14 12:35:15 -05:00
Dan Ryan d320bc4b1e Fix local and relative path installation
Summary of squashed commits:
* Handle relative paths more elegantly
* Wrapper around requirements.parse() for filesystem paths
* Undo previous hacks for simplicity
* Vendor pathlib2 for backwards compatibility
* Resolve relative paths for parsing, keep them relative in pipfile
* Add checks for empty req names and remote uris
* Add tests for local paths
* Fix test paramaterization
* Bugfixes for python27 and windows paths
* Fix windows tests
* Fix windows tests for python27 path encoding
* Re-vendor pathlib2 correctly
* Fix tests for windows paths
* Fix file and path checking
* Fix SCHEME_LIST rename
* Fix path resolution to check existence first
* Catch OSErrors for unpinned dependencies
* Last holdout of FILE_LIST conversion
* Fix for path resolution for unpinned packages
* Dont do path conversions on dictionaries
* Update docstring and comments

Signed-off-by: Dan Ryan <dan@danryan.co>
2017-11-14 00:39:57 -05:00
Dan Ryan f1e98c5e52 Add tests for is_vcs changes to prevent regression
- Fix vcs test for git+git syntax
2017-11-04 21:41:34 -04:00
Erin O'Connell b4336df8cd fixed a syntax error 2017-10-29 15:30:38 -06:00
Erin O'Connell c95da26ce0 Added checks to ensure non dev packages aren't removed 2017-10-29 15:20:50 -06:00
Erin O'Connell dda74142d4 Spell stuff correctly
Merge branch 'issue-873' of github.com:kennethreitz/pipenv into issue-873
2017-10-29 14:16:21 -06:00
Erin O'Connell 546f5494eb added test for new uninstall --all-dev flag 2017-10-29 14:04:48 -06:00
Hamad AlGhanim bb5c6c4aee test for installing from remote file (#950)
adding test for remote requirment
2017-10-26 08:57:06 -07:00
Nate Prewitt ad4fd824bf Revert "Fix #973 Fails if two conflicting "requires" sections are present." 2017-10-25 14:54:18 -07:00
Miroslav Zoricak b3093368a9 Fix #973 Fails if two conflicting "requires" sections are present.
Add a more explicit error message if a section of the Pipfile is duplicated
2017-10-25 21:49:13 +02:00
Erin O'Connell e5da54ba57 updated test for new lock -r functionality 2017-10-25 01:14:43 -06:00
Nate Prewitt 3688148ac7 add requirements.txt for testing 2017-10-21 15:09:24 -07:00
Nate Prewitt 090f01cb51 Merge pull request #904 from vphilippon/reversed-dependency-graph
Add pipenv graph --reverse
2017-10-18 18:14:57 -07:00
Vincent Philippon 0490d82272 Add pipenv graph --reverse
Outputs the reversed dependencies graph.

Ex:
requests==2.18.4
  - lib_with_good_taste==1.0.0 [requires requests>=2.18]
    - package_using_lib_with_good_taste==1.2.3 [requires lib_with_good_taste]
2017-10-18 19:29:45 -04:00
Hamad AlGhanim 9c4b68605c fix for #925 (#930)
* fix for adding newline

* added test to ensure fix #925
2017-10-18 10:07:17 -07:00