Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_rpm_build_err_parse(self):
with self.assertRaises(BuildException) as be:
PackageBuilder().build_rpm(
"", "", "", Path(""))
self.assertEqual(
sorted(be.errors),
sorted([text.decode("utf-8")
for text in MockedSubprocess.ErrorText]))
def __init__(self):
self.spec = Spec()
self.spec.Name = "mock"
self.spec.Version = "1.0"
self.spec.Release = "1%{?dist}"
self.spec.Summary = "Hello World test program"
self.spec.License = "GPLv2"
self.spec.Source = "mock-1.0.tar.gz"
self.spec.description = "Hello World C project for testing RPG."
self.spec.prep = r'%autosetup'
self.spec.build = "make"
self.sack = self.load_dnf_sack()
self._package_builder = PackageBuilder()
self.conf = FakeConf()
self.load_plugins()
def setUpClass(cls):
cls.distro = "fedora-22"
cls.arch = "x86_64"
cls.package_builder = PackageBuilder()
cls.package_builder.fetch_repos(cls.distro, cls.arch)
def __init__(self):
self._package_builder = PackageBuilder()
self.spec = Spec()
self.spec.Name = "hello"
self.spec.Version = "1.4"
self.spec.Release = "1%{?dist}"
self.spec.Summary = "Hello World test program"
self.spec.License = "GPLv2"
self.spec.Source = "hello-1.4.tar.gz"
self.spec.description = "Hello World C project for testing RPG."
self.spec.prep = r'%autosetup'
self.spec.build = "make"
self.spec.install = r"make install DESTDIR=%{RPM_BUILD_ROOT}"
def setUpClass(cls):
PackageBuilder.fetch_repos("fedora-22", "x86_64")
def __init__(self):
self.conf = Conf()
self._setup_logging()
self._project_builder = ProjectBuilder()
self.spec = Spec()
self.sack = None
self._package_builder = PackageBuilder()