# 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

try:
except ImportError:
    dnf = None



tests_dir = os.path.split(os.path.abspath(__file__))[0]


class TestSpec(object):
    td_dir = '{0}/test_data/'.format(tests_dir)
    bin_dir = os.path.split(tests_dir)[0] + '/'
    exe = 'python {0}mybin.py'.format(bin_dir)

    def setup_method(self, method):
        self.temp_dir = tempfile.mkdtemp()
        self.env = TestFileEnvironment(self.temp_dir, start_clear=False)

    def teardown_method(self, method):
        shutil.rmtree(self.temp_dir)

    @pytest.mark.parametrize(('package', 'options', 'expected'), [
        ('Jinja2', '-v2.8', 'python-Jinja2_py3_autonc.spec'),

# 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


try:
except ImportError:
    dnf = None



tests_dir = os.path.split(os.path.abspath(__file__))[0]


class TestSpec(object):
    td_dir = '{0}/test_data/'.format(tests_dir)
    bin_dir = os.path.split(tests_dir)[0] + '/'
    exe = 'python {0}mybin.py'.format(bin_dir)

    def setup_method(self, method):
        self.temp_dir = tempfile.mkdtemp()
        self.env = TestFileEnvironment(self.temp_dir, start_clear=False)

    def teardown_method(self, method):
        shutil.rmtree(self.temp_dir)

    @pytest.mark.parametrize(('package', 'options', 'expected'), [
        ('Jinja2', '-v2.8', 'python-Jinja2_py3_autonc.spec'),

        ('Jinja2', '-v2.8 -p2', 'python-Jinja2_py23_autonc.spec'),