Fixed package-implementation scoring
[zeroinstall/solver.git] / tests / testarch.py
blobf5248f32f6716ad1a2a991f3280081435d5e2560
1 #!/usr/bin/env python
2 from basetest import BaseTest
3 import sys
4 import unittest
6 sys.path.insert(0, '..')
7 from zeroinstall.injector.arch import get_architecture
9 class TestArch(BaseTest):
11 def setUp(self):
12 BaseTest.setUp(self)
14 def tearDown(self):
15 BaseTest.tearDown(self)
17 def testDefault(self):
18 arch = get_architecture(None, None)
19 assert arch
21 def testOs(self):
22 arch = get_architecture('MacOSX', 'ppc')
23 assert ('Darwin' in arch.os_ranks)
25 def testMachine(self):
26 arch = get_architecture('Linux', 'i686')
27 assert ('i386' in arch.machine_ranks)
29 if __name__ == '__main__':
30 unittest.main()