# Path: elbepack/commands/test.py
# class ElbeTestCase(unittest.TestCase):
# 
#     level = ElbeTestLevel.BASE
# 
#     def __init__(self, methodName='runTest', param=None):
#         self.methodName = methodName
#         self.param = param
#         self.stdout = None
#         super().__init__(methodName)
# 
#     def __str__(self):
#         name = super(ElbeTestCase, self).__str__()
#         if self.param:
#             return "%s : param=%s" % (name, self.param)
#         return name
# 
#     def parameterize(self, param):
#         return self.__class__(methodName=self.methodName, param=param)
# 
# def system(cmd, allow_fail=False):
#     ret, out = command_out(cmd)
#     if ret != 0 and not allow_fail:
#         raise ElbeTestException(cmd, ret, out)
# 
# class ElbeTestException(Exception):
# 
#     def __init__(self, cmd, ret, out):
#         super().__init__()
#         self.cmd = cmd
#         self.ret = ret
#         self.out = out
# 
#     def __repr__(self):
#         return f"ElbeTestException: \"{self.cmd}\" returns {self.ret}"
# 
#     def __str__(self):
#         return f"ElbeTestException: \"{self.cmd}\" returns {self.ret}"
# 
# Path: elbepack/shellhelper.py
# def system_out(cmd, stdin=None, allow_fail=False, env_add=None):
#     """system_out() - Wrapper around command_out().
# 
#     On failure, raises an exception if allow_fail=False, on success,
#     returns the output of cmd.
# 
#     --
# 
#     >>> system_out("false") # doctest: +ELLIPSIS
#     Traceback (most recent call last):
#     ...
#     elbepack.shellhelper.CommandError: ...
# 
#     >>> system_out("false", allow_fail=True)
#     ''
# 
#     """
#     code, out = command_out(cmd, stdin=stdin, env_add=env_add)
# 
#     if code != 0:
#         if not allow_fail:
#             raise CommandError(cmd, code)
# 
#     return out
# 
# Path: elbepack/directories.py
# def init_directories(elbe_relpath):
# def get_cmdlist():


import os
from elbepack.commands.test import ElbeTestCase, system, ElbeTestException
from elbepack.shellhelper import system_out
from elbepack.directories import pack_dir, elbe_exe, elbe_dir
                   for path
                   in [
                       "daemons/soap/esoap.py",

                       # These are not needed to be fixed since
                       # debianize is going to be rewritten
                       "debianize/base/tui.py",
                       "debianize/panels/base.py",
                       "debianize/panels/kernel.py",
                       "debianize/widgets/button.py",
                       "debianize/widgets/edit.py",
                       "debianize/widgets/form.py",
                       "debianize/widgets/grid.py",
                       "debianize/widgets/radio.py",

                       # FIXME: This one is an actual bug to be fixed
                       # 274:30: W0631: Using possibly undefined loop variable 'entry' (undefined-loop-variable)
                       # 276:26: W0631: Using possibly undefined loop variable 'entry' (undefined-loop-variable)
                       "hdimg.py",

                       "initvmaction.py",
                       "log.py",
                       "pbuilderaction.py",
                       "repomanager.py",
                       "rfs.py",
                       "rpcaptcache.py",
                   ]}

    @staticmethod
    def params():

# Path: elbepack/commands/test.py
# class ElbeTestCase(unittest.TestCase):
# 
#     level = ElbeTestLevel.BASE
# 
#     def __init__(self, methodName='runTest', param=None):
#         self.methodName = methodName
#         self.param = param
#         self.stdout = None
#         super().__init__(methodName)
# 
#     def __str__(self):
#         name = super(ElbeTestCase, self).__str__()
#         if self.param:
#             return "%s : param=%s" % (name, self.param)
#         return name
# 
#     def parameterize(self, param):
#         return self.__class__(methodName=self.methodName, param=param)
# 
# def system(cmd, allow_fail=False):
#     ret, out = command_out(cmd)
#     if ret != 0 and not allow_fail:
#         raise ElbeTestException(cmd, ret, out)
# 
# class ElbeTestException(Exception):
# 
#     def __init__(self, cmd, ret, out):
#         super().__init__()
#         self.cmd = cmd
#         self.ret = ret
#         self.out = out
# 
#     def __repr__(self):
#         return f"ElbeTestException: \"{self.cmd}\" returns {self.ret}"
# 
#     def __str__(self):
#         return f"ElbeTestException: \"{self.cmd}\" returns {self.ret}"
# 
# Path: elbepack/shellhelper.py
# def system_out(cmd, stdin=None, allow_fail=False, env_add=None):
#     """system_out() - Wrapper around command_out().
# 
#     On failure, raises an exception if allow_fail=False, on success,
#     returns the output of cmd.
# 
#     --
# 
#     >>> system_out("false") # doctest: +ELLIPSIS
#     Traceback (most recent call last):
#     ...
#     elbepack.shellhelper.CommandError: ...
# 
#     >>> system_out("false", allow_fail=True)
#     ''
# 
#     """
#     code, out = command_out(cmd, stdin=stdin, env_add=env_add)
# 
#     if code != 0:
#         if not allow_fail:
#             raise CommandError(cmd, code)
# 
#     return out
# 
# Path: elbepack/directories.py
# def init_directories(elbe_relpath):
# def get_cmdlist():


# Path: elbepack/tests/test_pylint.py
import os
from elbepack.commands.test import ElbeTestCase, system, ElbeTestException
from elbepack.shellhelper import system_out
from elbepack.directories import pack_dir, elbe_exe, elbe_dir

                   for path
                   in [
                       "daemons/soap/esoap.py",

                       # These are not needed to be fixed since
                       # debianize is going to be rewritten
                       "debianize/base/tui.py",
                       "debianize/panels/base.py",
                       "debianize/panels/kernel.py",
                       "debianize/widgets/button.py",
                       "debianize/widgets/edit.py",
                       "debianize/widgets/form.py",
                       "debianize/widgets/grid.py",
                       "debianize/widgets/radio.py",

                       # FIXME: This one is an actual bug to be fixed
                       # 274:30: W0631: Using possibly undefined loop variable 'entry' (undefined-loop-variable)
                       # 276:26: W0631: Using possibly undefined loop variable 'entry' (undefined-loop-variable)
                       "hdimg.py",

                       "initvmaction.py",
                       "log.py",
                       "pbuilderaction.py",
                       "repomanager.py",
                       "rfs.py",
                       "rpcaptcache.py",
                   ]}

    @staticmethod
    def params():

        files = system_out("find %s -iname '*.py'" % pack_dir).splitlines()