Пример #1
0
 def test_simple_pattern_pkgconfig_no_match(self):
     """
     Test simple_pattern_pkgconfig with no match, nothing should be modified
     """
     build.simple_pattern_pkgconfig('line to test for somepkg.xyz',
                                    r'testpkg.xyz', 'testpkg')
     self.assertEqual(build.buildreq.buildreqs, set())
     self.assertEqual(build.must_restart, 0)
Пример #2
0
 def test_simple_pattern_pkgconfig(self):
     """
     Test simple_pattern_pkgconfig with match
     """
     build.buildreq.config.config_opts['32bit'] = False
     build.simple_pattern_pkgconfig('line to test for testpkg.xyz',
                                    r'testpkg.xyz', 'testpkg')
     self.assertIn('pkgconfig(testpkg)', build.buildreq.buildreqs)
     self.assertEqual(build.must_restart, 1)
Пример #3
0
 def test_simple_pattern_pkgconfig_no_match(self):
     """
     Test simple_pattern_pkgconfig with no match, nothing should be modified
     """
     reqs = buildreq.Requirements("")
     build.simple_pattern_pkgconfig('line to test for somepkg.xyz',
                                    r'testpkg.xyz', 'testpkg', False, reqs)
     self.assertEqual(reqs.buildreqs, set())
     self.assertEqual(build.must_restart, 0)
Пример #4
0
 def test_simple_pattern_pkgconfig(self):
     """
     Test simple_pattern_pkgconfig with match
     """
     reqs = buildreq.Requirements("")
     build.simple_pattern_pkgconfig('line to test for testpkg.xyz',
                                    r'testpkg.xyz', 'testpkg', False, reqs)
     self.assertIn('pkgconfig(testpkg)', reqs.buildreqs)
     self.assertEqual(build.must_restart, 1)
Пример #5
0
 def test_simple_pattern_pkgconfig_32bit(self):
     """
     Test simple_pattern_pkgconfig with match and 32bit option set
     """
     build.buildreq.config.config_opts['32bit'] = True
     build.simple_pattern_pkgconfig('line to test for testpkg.zyx',
                                    r'testpkg.zyx', 'testpkgz')
     self.assertIn('pkgconfig(32testpkgz)', build.buildreq.buildreqs)
     self.assertIn('pkgconfig(testpkgz)', build.buildreq.buildreqs)
     self.assertEqual(build.must_restart, 1)
Пример #6
0
 def test_simple_pattern_pkgconfig_32bit(self):
     """
     Test simple_pattern_pkgconfig with match and 32bit option set
     """
     reqs = buildreq.Requirements("")
     build.simple_pattern_pkgconfig('line to test for testpkg.zyx',
                                    r'testpkg.zyx', 'testpkgz', True, reqs)
     self.assertIn('pkgconfig(32testpkgz)', reqs.buildreqs)
     self.assertIn('pkgconfig(testpkgz)', reqs.buildreqs)
     self.assertEqual(build.must_restart, 1)