[Piglit] [PATCH 4/5] core_tests.py: use PiglitConfig instead of SafeConfigParser

Timothy Arceri t_arceri at yahoo.com.au
Mon Jul 6 15:10:49 PDT 2015


I'd probably merge the config change with the final patch and split out the
removal of the unused function into its own patch.

Either way this and the final patch are:
Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>



On Thu, 2015-07-02 at 16:46 -0700, Dylan Baker wrote:
> This fixes a single case in a unit test of core.PIGLIT_CONFIG being
> replaced with a SafeConfigParser. It also removes an unused function
> 
> Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
> ---
>  framework/tests/core_tests.py | 9 +--------
>  1 file changed, 1 insertion(+), 8 deletions(-)
> 
> diff --git a/framework/tests/core_tests.py b/framework/tests/core_tests.py
> index 9a49515..bfbc87b 100644
> --- a/framework/tests/core_tests.py
> +++ b/framework/tests/core_tests.py
> @@ -26,7 +26,6 @@ import collections
>  import shutil
>  import textwrap
>  import functools
> -import ConfigParser
>  
>  import nose.tools as nt
>  
> @@ -66,8 +65,7 @@ def _save_core_config(func):
>              if os.path.exists('piglit.conf'):
>                  shutil.move('piglit.conf', 'piglit.conf.restore')
>                  restore_piglitconf = True
> -            core.PIGLIT_CONFIG = ConfigParser.SafeConfigParser(
> -                allow_no_value=True)
> +            core.PIGLIT_CONFIG = core.PiglitConfig(allow_no_value=True)
>          except Exception as e:
>              raise utils.UtilsError(e)
>  
> @@ -90,11 +88,6 @@ def _save_core_config(func):
>      return inner
>  
>  
> -def _reset_piglit_config():
> -    """ Set core.PIGLIT_CONFIG back to pristine """
> -    core.PIGLIT_CONFIG = core.PiglitConfig(allow_no_value=True)
> -
> -
>  @utils.nose_generator
>  def test_generate_initialize():
>      """ Generator that creates tests to initialize all of the classes in 
> core


More information about the Piglit mailing list