diff options
author | 2015-02-15 22:27:48 -0800 | |
---|---|---|
committer | 2015-02-15 22:29:29 -0800 | |
commit | cb1678c8310818a7a2202948dfcedfd70e4183d1 (patch) | |
tree | f565bbf45c40356f2e04c01c41d8307ee73e87ce | |
parent | tests: add initial test for profile-based iuse_effective attr (diff) | |
download | pkgcore-cb1678c8310818a7a2202948dfcedfd70e4183d1.tar.gz pkgcore-cb1678c8310818a7a2202948dfcedfd70e4183d1.tar.bz2 pkgcore-cb1678c8310818a7a2202948dfcedfd70e4183d1.zip |
tests: check empty iuse cases for ebuilds
-rw-r--r-- | pkgcore/test/ebuild/test_ebuild_src.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/pkgcore/test/ebuild/test_ebuild_src.py b/pkgcore/test/ebuild/test_ebuild_src.py index 61d6f663e..50d9b2324 100644 --- a/pkgcore/test/ebuild/test_ebuild_src.py +++ b/pkgcore/test/ebuild/test_ebuild_src.py @@ -69,18 +69,26 @@ class test_base(TestCase): self.assertEqual(o.description, 'foon\n asdf') def test_iuse(self): + o = self.get_pkg({}) + self.assertEqual(o.iuse, frozenset()) o = self.get_pkg({'IUSE': 'build pkg foon'}) self.assertEqual(o.iuse, frozenset(['build', 'foon', 'pkg'])) def test_iuse_stripped(self): - o = self.get_pkg({'EAPI': '0', 'IUSE': 'build pkg foon'}) + o = self.get_pkg({}) + self.assertEqual(o.iuse_stripped, frozenset()) + o = self.get_pkg({'IUSE': 'build pkg foon'}) self.assertEqual(o.iuse_stripped, frozenset(['build', 'foon', 'pkg'])) o = self.get_pkg({'EAPI': '1', 'IUSE': '+build -pkg foon'}) self.assertEqual(o.iuse_stripped, frozenset(['build', 'foon', 'pkg'])) def test_iuse_effective(self): + o = self.get_pkg({}) + self.assertEqual(o.iuse_effective, frozenset()) o = self.get_pkg({'IUSE': 'build pkg foon'}) self.assertEqual(o.iuse_effective, frozenset(['build', 'foon', 'pkg'])) + o = self.get_pkg({'EAPI': '1', 'IUSE': '+build -pkg foon'}) + self.assertEqual(o.iuse_effective, frozenset(['build', 'foon', 'pkg'])) def test_homepage(self): o = self.get_pkg({'HOMEPAGE': ' http://slashdot/ '}) |