28 Jun 2012 22:39
[PATCH] Client: Enhancements for xml_utils & unittest
Chris Evich <cevich <at> redhat.com>
2012-06-28 20:39:15 GMT
2012-06-28 20:39:15 GMT
* 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)
RSS Feed