FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-98414: py.exe launcher does not use defaults for -V:company/ option by zooba · Pull Request #98460 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (1) .py  (1) .rst  (1) All 3 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 7 additions & 0 deletions Lib/test/test_launcher.py
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -369,6 +369,13 @@ def test_filter_to_company(self):
self.assertEqual(company, data["env.company"])
self.assertEqual("3.100", data["env.tag"])

def test_filter_to_company_with_default(self):
company = "PythonTestSuite"
data = self.run_py([f"-V:{company}/"], env=dict(PY_PYTHON="3.0"))
self.assertEqual("X.Y.exe", data["LaunchCommand"])
self.assertEqual(company, data["env.company"])
self.assertEqual("3.100", data["env.tag"])

def test_filter_to_tag(self):
company = "PythonTestSuite"
data = self.run_py([f"-V:3.100"])
Expand Down
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Fix :file:`py.exe` launcher handling of ``-V:<company>/`` option when
default preferences have been set in environment variables or configuration
files.
1 change: 1 addition & 0 deletions PC/launcher2.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ parseCommandLine(SearchInfo *search)
search->tag = argStart;
}
search->tagLength = (int)(tail - search->tag);
search->allowDefaults = false;
search->restOfCmdLine = tail;
} else if (MATCHES(L"0") || MATCHES(L"-list")) {
search->list = true;
Expand Down

Back | FazBrowse Home | New Git URL