Message160904
Further changes are needed.
- The new dest_dir argument is not passed down to the internal functions, so I don’t understand how this is supposed to work.
- install_local_project needs a dest_dir argument too; Jonathan Fernandes started work on this at the last sprint.
- The test needs to be improved to really install a module and a script for example; I started to do that and also removed the usage of dist.Distribution (which is not the kind of distribution the install module works with: it uses database.Distribution and pypi.Dist (forgot the exact name) objects — yes, this is confusing as hell) but then the test code did not install anything; I ran out of time. I think tests should avoid using dist.Distribution and MagicMock but stay as close to possible as real usage:
- to test installing from a directory, create a temp dir with a setup.cfg file, a module and a script and call install_local_project (and other public functions that support a dir) with this dir as argument
- to test installing from an archive, create files, archive them and call the public install function with the path to that file as argument
- to test install_from_infos, call install_from_infos with a pypi.Something object pointing to an archive in a temp dir
That way, we could have confidence that all of this works, without explicitly using the internal functions in our tests. |
|
Date |
User |
Action |
Args |
2012-05-16 18:13:32 | eric.araujo | set | recipients:
+ eric.araujo, tarek, alexis, python-dev, mlhamel |
2012-05-16 18:13:32 | eric.araujo | set | messageid: <1337192012.52.0.896918635163.issue14270@psf.upfronthosting.co.za> |
2012-05-16 18:13:31 | eric.araujo | link | issue14270 messages |
2012-05-16 18:13:31 | eric.araujo | create | |
|