Chris Evich | 28 Jun 2012 22:39
Picon
Favicon
Gravatar

[PATCH] Client: Enhancements for xml_utils & unittest

* Added abstract base classes
    * TempXMLFile - Temporary file that unlinks on destruction
    * XMLBackup - Backup temporary file of some source content
    * XMLBase - ElementTree from Backup temporary file of source content
* Added unittests for all classes & methods

Signed-off-by: Chris Evich <cevich <at> redhat.com>
---
 client/shared/xml_utils.py          |  147 ++++++++++++++++++++++++
 client/shared/xml_utils_unittest.py |  213 ++++++++++++++++++++++++++++++++++-
 2 files changed, 358 insertions(+), 2 deletions(-)

diff --git a/client/shared/xml_utils.py b/client/shared/xml_utils.py
index d4bae45..cdfef25 100644
--- a/client/shared/xml_utils.py
+++ b/client/shared/xml_utils.py
 <at>  <at>  -3,9 +3,156  <at>  <at> 
     in python 2.4 systems.
 """

+import os.path, shutil, tempfile
+
 try:
     import autotest.common as common
 except ImportError:
     import common

+import logging
+
 from autotest.client.shared import ElementTree
(Continue reading)

Chris Evich | 2 Jul 2012 18:38
Picon
Favicon
Gravatar

Re: [PATCH] Client: Enhancements for xml_utils & unittest

On 06/28/2012 04:39 PM, Chris Evich wrote:
> * Added abstract base classes
>      * TempXMLFile - Temporary file that unlinks on destruction
>      * XMLBackup - Backup temporary file of some source content
>      * XMLBase - ElementTree from Backup temporary file of source content
> * Added unittests for all classes&  methods
>
> Signed-off-by: Chris Evich<cevich <at> redhat.com>
> ---
>   client/shared/xml_utils.py          |  147 ++++++++++++++++++++++++
>   client/shared/xml_utils_unittest.py |  213 ++++++++++++++++++++++++++++++++++-
>   2 files changed, 358 insertions(+), 2 deletions(-)
>

Ups, scratch this ML post, I just included it along with:

https://github.com/autotest/autotest/pull/434

Because we need ElementPath to be included also (I should have known 
this would happen).

--

-- 
Chris Evich, RHCA, RHCE, RHCDS, RHCSS
Quality Assurance Engineer
e-mail: cevich + ` <at> ' + redhat.com o: 1-888-RED-HAT1 x44214

Gmane