aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMykyta Holubakha <hilobakho@gmail.com>2017-06-19 04:24:06 +0300
committerMykyta Holubakha <hilobakho@gmail.com>2017-06-19 04:24:06 +0300
commit7334e41998fb99dfd10dcf9fd977967ceb0f79f2 (patch)
tree07d821e70b1d72de917d0f6470bbbc184afc159e /tests
parentmajor refactoring of pomu package source module (diff)
downloadpomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.tar.gz
pomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.tar.bz2
pomu-7334e41998fb99dfd10dcf9fd977967ceb0f79f2.zip
Numerous improvements and fixes
Documented most of the functions and classes. Added an option to fetch a package into a specified directory. Added a merge_into method to the Package class, which would merge it into a directory, and refactored repo::merge_package to use that. Extended the package class to store category, version and slot metadata. Added tests of the portage package source module.
Diffstat (limited to 'tests')
-rw-r--r--tests/test_dispatch.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/test_dispatch.py b/tests/test_dispatch.py
index 7ccf830..5ccba6d 100644
--- a/tests/test_dispatch.py
+++ b/tests/test_dispatch.py
@@ -12,7 +12,7 @@ from pomu.util.result import Result
@dispatcher.source
class DummySource():
- @dispatcher.handler
+ @dispatcher.handler(priority=3)
@classmethod
def parse(cls, uri):
if uri.startswith('/'):
@@ -33,6 +33,7 @@ class DispatcherTests(unittest.TestCase):
def testDispatch(self):
self.assertEqual(dispatcher.get_package_source('/test').unwrap(), 'test')
self.assertTrue(dispatcher.get_package_source('test').is_err())
+ self.assertTrue(dispatcher.get_package('sys-apps/portage').is_ok())
def testFetch(self):
pkg = dispatcher.get_package('/test').unwrap()
@@ -64,6 +65,10 @@ class InstallTests(unittest.TestCase):
pkg = Package('test', self.source_path)
self.repo.merge(pkg).expect()
+ def testPortagePkg(self):
+ pkg = dispatcher.get_package('sys-apps/portage').expect()
+ self.repo.merge(pkg).expect()
+
def testPkgUnmerge(self):
pkg = Package('test', self.source_path)
self.repo.merge(pkg).expect()