[qmtest] PATCH: Enhance DejaGNU result reader
Pragnesh Sampat
pragnesh.sampat at timesys.com
Tue Oct 25 19:50:19 UTC 2005
> ===================================================================
> RCS file: /home/qm/Repository/qm/qm/test/classes/dejagnu_stream.py,v
> retrieving revision 1.3
> diff -c -5 -p -r1.3 dejagnu_stream.py
> *** qm/test/classes/dejagnu_stream.py 24 Aug 2005 02:48:30 -0000 1.3
> --- qm/test/classes/dejagnu_stream.py 24 Oct 2005 07:25:44 -0000
> ***************
> *** 15,29 ****
> --- 15,32 ----
>
> ########################################################################
> # Imports
> ########################################################################
>
> + import cgi
> from dejagnu_test import DejaGNUTest
> import qm.fields
> from qm.test.file_result_stream import FileResultStream
> from qm.test.result import Result
> from qm.test.file_result_reader import FileResultReader
> + import re
> + from sets import Set
Hello,
We are using qmtest to drive some of our test needs. I noticed that
this breaks python 2.2, due to the use of sets, which came in python
2.3. This is the only case I found that breaks on python 2.2. Maybe it
is not important to support python 2.2, but I thought I would note it,
just in case it was unintentional (Some basic set operations can be
supported via dictionaries, although sets are clearly the way to go).
I tested the following patch under 2.3, checking now under 2.2.
-Pragnesh
--- qm/ChangeLog-orig
+++ qm/ChangeLog
@@ -5,7 +5,6 @@
* qm/test/classes/dejagnu_stream.py (cgi): Import it.
(re): Likewise.
- (sets.Set): Likewise.
(DejaGNUReader): Add combined mode. Add expectations-generation
mode.
--- qm/qm/test/classes/dejagnu_stream.py-orig
+++ qm/qm/test/classes/dejagnu_stream.py
@@ -24,7 +24,6 @@
from qm.test.result import Result
from qm.test.file_result_reader import FileResultReader
import re
-from sets import Set
########################################################################
# Classes
@@ -204,7 +203,7 @@
raise FileResultReader.InvalidFile, \
"file is not a DejaGNU result stream"
self.file.seek(0)
- self.test_ids = Set()
+ self.test_ids = {}
if self.__UseCombinedMode():
test_id, dejagnu_outcome, cause = self.__NextOutcome()
if test_id:
More information about the qmtest
mailing list