Commits

German Larrain committed e5eb781

utils.version.get_version: added many more examples to cover all cases.

Comments (0)

Files changed (1)

ars/utils/version.py

 
 	>>> get_version(version=(0, 4, 0, 'alpha', 0))
 	0.4.dev20130401011455
+	>>> get_version(version=(0, 4, 0, 'alpha', 1))
+	0.4a1
+	>>> get_version(version=(0, 4, 1, 'alpha', 0))
+	0.4.1.dev20130401011455
+	>>> get_version(version=(0, 4, 1, 'alpha', 1))
+	0.4.1a1
+	>>> get_version(version=(0, 4, 0, 'beta', 0))
+	0.4b0
+	>>> get_version(version=(0, 4, 0, 'rc', 0))
+	0.4c0
+	>>> get_version(version=(0, 4, 0, 'final', 0))
+	0.4
+	>>> get_version(version=(0, 4, 0, 'final', 1))
+	0.4
+	>>> get_version(version=(0, 4, 1, 'final', 0))
+	0.4.1
+
 	>>> get_version(version=(0, 4, 0, 'alpha', 0), length='medium')
 	0.4.dev
 	>>> get_version(version=(0, 4, 0, 'alpha', 0), length='short')