Пример #1
0
    def testAll(self):
        self.assert_(match_architecture('all', 'all'))

        self.assert_(not match_architecture('amd64', 'all'))
        self.assert_(not match_architecture('all', 'amd64'))

        self.assert_(not match_architecture('all', 'any'))
Пример #2
0
    def testAll(self):
        self.assertTrue(match_architecture('all', 'all'))

        self.assertTrue(not match_architecture('amd64', 'all'))
        self.assertTrue(not match_architecture('all', 'amd64'))

        self.assertTrue(not match_architecture('all', 'any'))
Пример #3
0
 def built_on_architecture(self, architecture):
     archs = self.architectures
     if archs is None:
         return None
     for arch in archs:
         if match_architecture(architecture, arch):
             return True
     return False
Пример #4
0
 def built_on_architecture(self, architecture):
     archs = self.architectures
     if archs is None:
         return None
     for arch in archs:
         if match_architecture(architecture, arch):
             return True
     return False
Пример #5
0
 def testEqual(self):
     self.assertTrue(match_architecture('amd64', 'amd64'))
     self.assertTrue(match_architecture('linux-amd64', 'linux-amd64'))
     self.assertTrue(match_architecture('linux-amd64', 'amd64'))
     self.assertTrue(match_architecture('amd64', 'linux-amd64'))
     self.assertTrue(not match_architecture('amd64', 'i386'))
     self.assertTrue(match_architecture('kfreebsd-amd64', 'kfreebsd-amd64'))
     self.assertTrue(not match_architecture('kfreebsd-amd64', 'amd64'))
Пример #6
0
 def testEqual(self):
     self.assert_(match_architecture('amd64', 'amd64'))
     self.assert_(match_architecture('linux-amd64', 'linux-amd64'))
     self.assert_(match_architecture('linux-amd64', 'amd64'))
     self.assert_(match_architecture('amd64', 'linux-amd64'))
     self.assert_(not match_architecture('amd64', 'i386'))
     self.assert_(match_architecture('kfreebsd-amd64', 'kfreebsd-amd64'))
     self.assert_(not match_architecture('kfreebsd-amd64', 'amd64'))
Пример #7
0
    def testAny(self):
        self.assertTrue(match_architecture('amd64', 'any'))
        self.assertTrue(match_architecture('amd64', 'any-amd64'))
        self.assertTrue(match_architecture('x32', 'any-amd64'))
        self.assertTrue(match_architecture('kfreebsd-amd64', 'any-amd64'))
        self.assertTrue(not match_architecture('amd64', 'any-i386'))

        self.assertTrue(match_architecture('kfreebsd-amd64', 'kfreebsd-any'))
        self.assertTrue(not match_architecture('amd64', 'kfreebsd-any'))
Пример #8
0
    def testAny(self):
        self.assert_(match_architecture('amd64', 'any'))
        self.assert_(match_architecture('amd64', 'any-amd64'))
        self.assert_(match_architecture('x32', 'any-amd64'))
        self.assert_(match_architecture('kfreebsd-amd64', 'any-amd64'))
        self.assert_(not match_architecture('amd64', 'any-i386'))

        self.assert_(match_architecture('kfreebsd-amd64', 'kfreebsd-any'))
        self.assert_(not match_architecture('amd64', 'kfreebsd-any'))