[rhel6-branch][pykickstart][PATCH 2/3] Add class for multi-line command sequence tests

Vratislav Podzimek vpodzime at redhat.com
Tue Aug 13 09:30:24 UTC 2013


On Mon, 2013-08-12 at 18:48 +0200, Martin Kolman wrote:
> Because the CommandTest class only supports testing of single-line commands,
> the new CommandSequenceTest class that supports testing of multi-line
> kickstart command sequences has been added.
> 
> Signed-off-by: Martin Kolman <mkolman at redhat.com>
> ---
>  tests/baseclass.py | 61 +++++++++++++++++++++++++++++++++++++++++++++++++++++-
>  1 file changed, 60 insertions(+), 1 deletion(-)
> 
> diff --git a/tests/baseclass.py b/tests/baseclass.py
> index 1e40909..45868f1 100644
> --- a/tests/baseclass.py
> +++ b/tests/baseclass.py
> @@ -6,9 +6,12 @@ import imputil
>  import glob
>  import warnings
>  import re
> +import tempfile
> +import shutil
>  
> -from pykickstart.version import versionMap, returnClassForVersion
> +from pykickstart.version import *
>  from pykickstart.errors import *
> +from pykickstart.parser import preprocessFromString, KickstartParser
>  import gettext
>  gettext.textdomain("pykickstart")
>  _ = lambda x: gettext.ldgettext("pykickstart", x)
> @@ -107,6 +110,62 @@ class CommandTest(unittest.TestCase):
>              if op.get_opt_string() == opt:
>                  self.assertEqual(op.type, opt_type)
>  
> +
> +class CommandSequenceTest(unittest.TestCase):
> +    """Kickstart command sequence testing
> +
> +    Enables testing kickstart kickstart command sequences
> +    and checking if their parsing raises or not raises
> +    a parsing exception.
> +    """
Double "kickstart" and maybe "doesn't raise" instead of "not raises".

-- 
Vratislav Podzimek

Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic



More information about the anaconda-patches mailing list