[csw-devel] SF.net SVN: gar:[17690] csw/mgar/gar/v2/lib/python/opencsw_test.py
wahwah at users.sourceforge.net
wahwah at users.sourceforge.net
Sun Apr 15 10:32:06 CEST 2012
Revision: 17690
http://gar.svn.sourceforge.net/gar/?rev=17690&view=rev
Author: wahwah
Date: 2012-04-15 08:32:06 +0000 (Sun, 15 Apr 2012)
Log Message:
-----------
opencsw_test: New test case
Add a test case for a package with no OS release in the filename.
Modified Paths:
--------------
csw/mgar/gar/v2/lib/python/opencsw_test.py
Modified: csw/mgar/gar/v2/lib/python/opencsw_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/opencsw_test.py 2012-04-15 08:31:44 UTC (rev 17689)
+++ csw/mgar/gar/v2/lib/python/opencsw_test.py 2012-04-15 08:32:06 UTC (rev 17690)
@@ -118,6 +118,13 @@
self.assertEqual(parsed["catalogname"], "boost-jam")
self.assertEqual(parsed["vendortag"], "UNCOMMITTED")
+ def testParsePackageFileName_Achievo(self):
+ file_name = ("achievo-0.8.4-all-CSW.pkg.gz")
+ parsed = opencsw.ParsePackageFileName(file_name)
+ self.assertEqual(parsed["arch"], "all")
+ self.assertEqual(parsed["catalogname"], "achievo")
+ self.assertEqual(parsed["osrel"], "unspecified")
+
def testParsePackageFileName_Nonsense(self):
"""Checks if the function can sustain a non-conformant string."""
file_name = "What if I wrote a letter to my grandma here?"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the devel
mailing list