aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Harder <radhermit@gmail.com>2018-09-29 10:32:46 -0400
committerTim Harder <radhermit@gmail.com>2018-09-29 10:41:03 -0400
commitc6d52a583b3556cf20b1eb7cb789da2d2df61161 (patch)
treefe20335692bde3ad449ec351116e2be14688d1b5 /tests/ebuild/test_eapi.py
parentebuild.eapi: add default values for most EAPI obj parameters (diff)
downloadpkgcore-c6d52a583b3556cf20b1eb7cb789da2d2df61161.tar.gz
pkgcore-c6d52a583b3556cf20b1eb7cb789da2d2df61161.tar.bz2
pkgcore-c6d52a583b3556cf20b1eb7cb789da2d2df61161.zip
tests: add initial explicit EAPI obj tests
Diffstat (limited to 'tests/ebuild/test_eapi.py')
-rw-r--r--tests/ebuild/test_eapi.py19
1 files changed, 19 insertions, 0 deletions
diff --git a/tests/ebuild/test_eapi.py b/tests/ebuild/test_eapi.py
new file mode 100644
index 00000000..f78a0bc2
--- /dev/null
+++ b/tests/ebuild/test_eapi.py
@@ -0,0 +1,19 @@
+# Copyright: 2018 Tim Harder <radhermit@gmail.com>
+# License: GPL2/BSD
+
+from pkgcore.ebuild.eapi import (
+ EAPI, eapi0, eapi1, eapi2, eapi3, eapi4, eapi5, eapi6, eapi7)
+
+import pytest
+
+
+class TestEAPI(object):
+
+ def test_register_known(self):
+ # re-register known EAPI
+ with pytest.raises(ValueError):
+ EAPI.register(magic="0")
+
+ def test_inherits(self):
+ assert list(eapi0.inherits) == [eapi0]
+ assert list(eapi7.inherits) == [eapi7, eapi6, eapi5, eapi4, eapi3, eapi2, eapi1, eapi0]