Пример #1
0
 def test_python_find_requires(self):
     plugin = PythonPlugin()
     plugin.patched(self.test_project_dir / "py" / "requires",
                    self.spec, self.sack)
     self.assertTrue(any(re.match(
         r"/usr/lib.*/python.*/lib-dynload/math\.cpython.*\.so", req)
         for req in self.spec.required_files))
Пример #2
0
 def test_python_find_requires(self):
     plugin = PythonPlugin()
     plugin.patched(self.test_project_dir / "py" / "requires", self.spec,
                    self.sack)
     self.assertTrue(
         any(
             re.match(
                 r"/usr/lib.*/python.*/lib-dynload/math\.cpython.*\.so",
                 req) for req in self.spec.required_files))
Пример #3
0
 def test_python_find_requires(self):
     # FIXME when ORed files considered
     plugin = PythonPlugin()
     plugin.patched(self.test_project_dir / "py" / "requires",
                    self.spec, self.sack)
     version = sys.version_info
     arch = get_architecture()
     if arch == 32:
         arch = ""
     imports = [("/usr/lib{0}/python{1}.{2}/" +
                 "lib-dynload/math.cpython-{1}{2}m.so")
                .format(arch, version.major, version.minor)]
     self.assertEqual(self.spec.required_files, set(imports))
Пример #4
0
 def test_python_find_requires(self):
     # FIXME when ORed files considered
     plugin = PythonPlugin()
     plugin.patched(self.test_project_dir / "py" / "requires",
                    self.spec, self.sack)
     version = sys.version_info
     arch = get_architecture()
     if arch == 32:
         arch = ""
     imports = [("/usr/lib{0}/python{1}.{2}/" +
                 "lib-dynload/math.cpython-{1}{2}m.so")
                .format(arch, version.major, version.minor)]
     self.assertEqual(self.spec.required_files, set(imports))
Пример #5
0
 def test_python_find_requires(self):
     plugin = PythonPlugin()
     plugin.patched(self.test_project_dir / "py" / "requires",
                    self.spec, self.sack)
     imports = glob("/usr/lib*/python*/lib-dynload/math.cpython-*m.so")
     self.assertEqual(self.spec.required_files, set(imports))