test_match_from_list: fix _pkg_str usage
authorZac Medico <zmedico@gentoo.org>
Tue, 12 Jun 2012 07:21:57 +0000 (00:21 -0700)
committerZac Medico <zmedico@gentoo.org>
Tue, 12 Jun 2012 07:21:57 +0000 (00:21 -0700)
pym/portage/tests/dep/test_match_from_list.py

index afba4141f06a6766e2b02943d96409ab95e03621..fae473e207cf5289afccebc570f01795050dc9ee 100644 (file)
@@ -1,10 +1,10 @@
-# Copyright 2006, 2010 Gentoo Foundation
+# Copyright 2006-2012 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import sys
 from portage.tests import TestCase
 from portage.dep import Atom, match_from_list, _repo_separator
-from portage.versions import catpkgsplit
+from portage.versions import catpkgsplit, _pkg_str
 
 if sys.hexversion >= 0x3000000:
        basestring = str
@@ -16,7 +16,7 @@ class Package(object):
        def __init__(self, atom):
                atom = Atom(atom, allow_repo=True)
                self.cp = atom.cp
-               self.cpv = atom.cpv
+               self.cpv = _pkg_str(atom.cpv, slot=(atom.slot or '0'), repo=atom.repo)
                self.cpv_split = catpkgsplit(self.cpv)
                self.slot = atom.slot
                self.repo = atom.repo