Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(229)

Unified Diff: vpython/python/python_test.go

Issue 2874683002: vpython: Version parser from PEP440. (Closed)
Patch Set: stronger test case Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | vpython/python/version.go » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: vpython/python/python_test.go
diff --git a/vpython/python/python_test.go b/vpython/python/python_test.go
index 76ec87f74b3bbf352b49ccae2038575f896b9b00..4161ad10f695d39bf7ca287feb283f9e1a9bf699 100644
--- a/vpython/python/python_test.go
+++ b/vpython/python/python_test.go
@@ -147,7 +147,9 @@ func TestInterpreterGetVersion(t *testing.T) {
vers Version
}{
{"Python 2.7.1\n", Version{2, 7, 1}},
+ {"Python 2.7.1+local string", Version{2, 7, 1}},
{"Python 3", Version{3, 0, 0}},
+ {"Python 3.1.2.3.4", Version{3, 1, 2}},
}
versionFailures := []struct {
@@ -157,8 +159,7 @@ func TestInterpreterGetVersion(t *testing.T) {
{"", "unknown version output"},
{"Python2.7.11\n", "unknown version output"},
{"Python", "unknown version output"},
- {"Python 2.7.11 foo bar junk", "invalid number value"},
- {"Python 3.1.2.3.4", "failed to parse version"},
+ {"Python 2.7.11 foo bar junk", "non-canonical Python version string"},
}
Convey(`Testing Interpreter.GetVersion`, t, func() {
« no previous file with comments | « no previous file | vpython/python/version.go » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698