diff options
author | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-30 14:29:39 +0100 |
---|---|---|
committer | Lars Wirzenius <lars.wirzenius@codethink.co.uk> | 2012-03-30 14:29:39 +0100 |
commit | 98961cb380a78ac76a58dc61ee1aa881f730180e (patch) | |
tree | e7a05d6a6148d6eed8f967f7e31d4bfbfdc43e41 /morphlib/buildsystem_tests.py | |
parent | e039026513a7536579d0894bdfb052e6bd560058 (diff) | |
download | morph-98961cb380a78ac76a58dc61ee1aa881f730180e.tar.gz |
Add looking up of build systems by name
Diffstat (limited to 'morphlib/buildsystem_tests.py')
-rw-r--r-- | morphlib/buildsystem_tests.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/morphlib/buildsystem_tests.py b/morphlib/buildsystem_tests.py index c8e9058f..362b85dd 100644 --- a/morphlib/buildsystem_tests.py +++ b/morphlib/buildsystem_tests.py @@ -90,3 +90,16 @@ class DetectBuildSystemTests(unittest.TestCase): bs = morphlib.buildsystem.detect_build_system(self.tempdir) self.assertEqual(type(bs), morphlib.buildsystem.AutotoolsBuildSystem) + +class LookupBuildSystemTests(unittest.TestCase): + + def lookup(self, name): + return morphlib.buildsystem.lookup_build_system(name) + + def test_raises_keyerror_for_unknown_name(self): + self.assertRaises(KeyError, self.lookup, 'unkonwn') + + def test_looks_up_manual(self): + self.assertEqual(type(self.lookup('manual')), + morphlib.buildsystem.ManualBuildSystem) + |