mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-19 00:05:36 +00:00
Bug 1565725: Make tests of mozfile.which
insensitive to the case of the cwd on windows; r=ahal
Differential Revision: https://phabricator.services.mozilla.com/D37949 --HG-- extra : moz-landing-system : lando
This commit is contained in:
parent
e7ad7b7104
commit
d644374710
@ -21,14 +21,14 @@ def test_which(monkeypatch):
|
||||
bindir = os.path.join(cwd, "win")
|
||||
monkeypatch.setenv("PATH", bindir)
|
||||
|
||||
assert which("foo.exe").lower() == os.path.join(bindir, "foo.exe")
|
||||
assert which("foo").lower() == os.path.join(bindir, "foo.exe")
|
||||
assert which("foo", exts=[".FOO", ".BAR"]).lower() == os.path.join(bindir, "foo")
|
||||
assert which("foo.exe").lower() == os.path.join(bindir, "foo.exe").lower()
|
||||
assert which("foo").lower() == os.path.join(bindir, "foo.exe").lower()
|
||||
assert which("foo", exts=[".FOO", ".BAR"]).lower() == os.path.join(bindir, "foo").lower()
|
||||
assert os.environ.get("PATHEXT") != [".FOO", ".BAR"]
|
||||
assert which("foo.txt") is None
|
||||
|
||||
assert which("bar").lower() == os.path.join(bindir, "bar")
|
||||
assert which("baz").lower() == os.path.join(cwd, "baz.exe")
|
||||
assert which("bar").lower() == os.path.join(bindir, "bar").lower()
|
||||
assert which("baz").lower() == os.path.join(cwd, "baz.exe").lower()
|
||||
|
||||
else:
|
||||
bindir = os.path.join(cwd, "unix")
|
||||
|
Loading…
Reference in New Issue
Block a user