1. Holger Krekel
  2. tox
  3. Pull requests

Pull requests

#19 Merged
Repository
pmoore
Branch
default
Repository
hpk42
Branch
default

Fallback to py.exe launcher to locate Python versions on Windows

Author
  1. Paul Moore
Reviewers
Description
No description

Comments (5)

  1. Paul Moore author

    To be able to run a useful test, it would have to be run on a Windows machine with py.exe installed, where at least one of the Python versions was not installed in the standard location. I can probably write such code, but it will likely only prove anything when run on my PC :-) Is that OK?

    Or I could alter the patch somehow to make it testable (maybe by adding an argument to find_executable, defaulting to False, which disabled the check for the standard locations so that my code could get tested). Would that be a more acceptable option?

  2. Holger Krekel repo owner

    doesn't need to be a fully functional test. You could put the py.exe functionality into a function and test that function, possibly by accepting monkeypatch in the test function and then do something like monkeypath(py.path.local, "sysfind", PseudoPath) and have PseudoPath have a static sysexe() method. This way the full code path can run, and we just assume that py.exe behaves correctly.