diff options
author | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2012-06-22 02:59:53 -0700 |
commit | e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01 (patch) | |
tree | bc90757f7887bf571d98617d1178ff2be3c90ff1 /pym/portage/tests/dep/testAtom.py | |
parent | 19123d07f93bff6833848774812de882e7be9960 (diff) | |
download | portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.gz portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.tar.bz2 portage-e4ba8f36e6a4624f4fec61c7ce8bed0e3bd2fa01.zip |
Add experimental EAPI 4-slot-abi support.
Refer to 4-slot-abi.docbook for a full description.
Diffstat (limited to 'pym/portage/tests/dep/testAtom.py')
-rw-r--r-- | pym/portage/tests/dep/testAtom.py | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/pym/portage/tests/dep/testAtom.py b/pym/portage/tests/dep/testAtom.py index 092cacf84..e0cfaabcf 100644 --- a/pym/portage/tests/dep/testAtom.py +++ b/pym/portage/tests/dep/testAtom.py @@ -144,6 +144,25 @@ class TestAtom(TestCase): self.assertRaisesMsg(atom, (InvalidAtom, TypeError), Atom, atom, \ allow_wildcard=allow_wildcard, allow_repo=allow_repo) + def testSlotAbiAtom(self): + tests = ( + ("virtual/ffmpeg:0/53", "4-slot-abi", {"slot": "0", "slot_abi": "53", "slot_abi_op": None}), + ("virtual/ffmpeg:0/53=", "4-slot-abi", {"slot": "0", "slot_abi": "53", "slot_abi_op": "="}), + ("virtual/ffmpeg:=", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": "="}), + ("virtual/ffmpeg:0=", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": "="}), + ("virtual/ffmpeg:*", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": "*"}), + ("virtual/ffmpeg:0*", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": "*"}), + ("virtual/ffmpeg:0", "4-slot-abi", {"slot": "0", "slot_abi": None, "slot_abi_op": None}), + ("virtual/ffmpeg", "4-slot-abi", {"slot": None, "slot_abi": None, "slot_abi_op": None}), + ) + + for atom, eapi, parts in tests: + a = Atom(atom, eapi=eapi) + for k, v in parts.items(): + self.assertEqual(v, getattr(a, k), + msg="Atom('%s').%s = %s == '%s'" % + (atom, k, getattr(a, k), v )) + def test_intersects(self): test_cases = ( ("dev-libs/A", "dev-libs/A", True), |