# Path: pyp2rpm/bin.py
# CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
# class Pyp2rpmCommand(click.Command):
# class SclizeOption(click.Option):
#     def format_options(self, ctx, formatter):
#     def handle_parse_result(self, ctx, opts, args):
#     def get_help_record(self, ctx):
#     def get_scl_help_record(self, ctx):
# def main(package, v, prerelease, d, s, r, proxy, srpm, p, b, o, t, venv, autonc,
#          sclize, **scl_kwargs):
# def convert_to_scl(spec, scl_options):


import pytest
import os
import tempfile
import shutil
    import dnf
from flexmock import flexmock
from scripttest import TestFileEnvironment
from pyp2rpm.bin import Convertor, SclConvertor, main, convert_to_scl
        shutil.rmtree(self.temp_dir)

    @pytest.mark.webtest
    def test_srpm(self):
        res = self.env.run('{0} Jinja2 -v2.8 --srpm'.format(self.exe),
                           expect_stderr=True)
        assert res.returncode == 0


@pytest.mark.skipif(SclConvertor is None, reason="spec2scl not installed")
class TestSclIntegration(object):
    """
    """
    sphinx_spec = '{0}/test_data/python-sphinx_autonc.spec'.format(tests_dir)

    @classmethod
    def setup_class(cls):
        with open(cls.sphinx_spec, 'r') as spec:
            cls.test_spec = spec.read()

    def setup_method(self, method):
        self.default_options = {
            'no_meta_runtime_dep': False,
            'no_meta_buildtime_dep': False,
            'skip_functions': [''],
            'no_deps_convert': False,
            'list_file': None,
            'meta_spec': None
        }
        flexmock(Convertor).should_receive('__init__').and_return(None)

# Path: pyp2rpm/bin.py
# CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
# class Pyp2rpmCommand(click.Command):
# class SclizeOption(click.Option):
#     def format_options(self, ctx, formatter):
#     def handle_parse_result(self, ctx, opts, args):
#     def get_help_record(self, ctx):
#     def get_scl_help_record(self, ctx):
# def main(package, v, prerelease, d, s, r, proxy, srpm, p, b, o, t, venv, autonc,
#          sclize, **scl_kwargs):
# def convert_to_scl(spec, scl_options):


# Path: tests/test_integration.py
import pytest
import os
import tempfile
import shutil
    import dnf
from flexmock import flexmock
from scripttest import TestFileEnvironment
from pyp2rpm.bin import Convertor, SclConvertor, main, convert_to_scl

        shutil.rmtree(self.temp_dir)

    @pytest.mark.webtest
    def test_srpm(self):
        res = self.env.run('{0} Jinja2 -v2.8 --srpm'.format(self.exe),
                           expect_stderr=True)
        assert res.returncode == 0


@pytest.mark.skipif(SclConvertor is None, reason="spec2scl not installed")
class TestSclIntegration(object):
    """
    """
    sphinx_spec = '{0}/test_data/python-sphinx_autonc.spec'.format(tests_dir)

    @classmethod
    def setup_class(cls):
        with open(cls.sphinx_spec, 'r') as spec:
            cls.test_spec = spec.read()

    def setup_method(self, method):
        self.default_options = {
            'no_meta_runtime_dep': False,
            'no_meta_buildtime_dep': False,
            'skip_functions': [''],
            'no_deps_convert': False,
            'list_file': None,
            'meta_spec': None
        }
        flexmock(Convertor).should_receive('__init__').and_return(None)

        flexmock(Convertor).should_receive('convert').and_return(