r196 - branches/rewrite/tests/PackageList

Otavio Salvador partial-mirror-devel@lists.alioth.debian.org
Mon, 26 Jul 2004 13:33:51 -0600


Author: otavio
Date: Mon Jul 26 13:33:47 2004
New Revision: 196

Modified:
   branches/rewrite/tests/PackageList/test.py
Log:
Solved.

Modified: branches/rewrite/tests/PackageList/test.py
==============================================================================
--- branches/rewrite/tests/PackageList/test.py	(original)
+++ branches/rewrite/tests/PackageList/test.py	Mon Jul 26 13:33:47 2004
@@ -74,8 +74,11 @@
 test('Package Already Exists', alreadyExistsTest, 'PackageAlreadyExists')
 
 def removeTest():
-    # reuse the previous list ###WHY?
+    parse = apt_pkg.ParseTagFile(open('Packages', "r"))
     packagelist = PackageList()
+    while parse.Step() == 1:
+        p = Package(parse.Section)
+        packagelist.add(p)
     # this is valid
     packagelist.remove('brandeisblue')
     if len(packagelist) != 0:
@@ -90,5 +93,4 @@
         packagelist.add(p)
 
         np = packagelist.filter({'priority' : 'optional'})
-        print np.keys()
 test('Filter package test', filterTest)