[py-svn] r34963 - in py/dist/py/test/rsession: . webdata
fijal at codespeak.net
fijal at codespeak.net
Sat Nov 25 16:04:38 CET 2006
Author: fijal
Date: Sat Nov 25 16:04:35 2006
New Revision: 34963
Modified:
py/dist/py/test/rsession/webdata/source.js
py/dist/py/test/rsession/webjs.py
Log:
Added counters.
Modified: py/dist/py/test/rsession/webdata/source.js
==============================================================================
Binary files. No diff available.
Modified: py/dist/py/test/rsession/webjs.py
==============================================================================
--- py/dist/py/test/rsession/webjs.py (original)
+++ py/dist/py/test/rsession/webjs.py Sat Nov 25 16:04:35 2006
@@ -23,8 +23,10 @@
tracebacks = {}
skips = {}
counters = {}
+max_items = {}
+short_item_names = {}
-MAX_COUNTER = 50
+MAX_COUNTER = 50 # Maximal size of one-line table
class Pending(object):
def __init__(self):
@@ -70,7 +72,10 @@
tr = create_elem("tr")
td = create_elem("td")
tr.appendChild(td)
- td.appendChild(create_text_elem("%s[%s]" % (msg['itemname'], msg['length'])))
+ td.appendChild(create_text_elem("%s[0/%s]" % (msg['itemname'], msg['length'])))
+ max_items[msg['fullitemname']] = int(msg['length'])
+ short_item_names[msg['fullitemname']] = msg['itemname']
+ td.id = '_txt_' + msg['fullitemname']
#tr.setAttribute("id", msg['fullitemname'])
td.setAttribute("onmouseover", "show_info('%s')" % msg['fullitemname'])
td.setAttribute("onmouseout", "hide_info()")
@@ -119,8 +124,12 @@
if counters[msg['fullmodulename']] % MAX_COUNTER == 0:
tr = create_elem("tr")
module_part.appendChild(tr)
-
- counters[msg['fullmodulename']] += 1
+
+ name = msg['fullmodulename']
+ counters[name] += 1
+ counter_part = get_elem('_txt_' + name)
+ counter_part.childNodes[0].nodeValue = "%s[%d/%d]" % \
+ (short_item_names[name], counters[name], max_items[name])
module_part.childNodes[-1].appendChild(td)
except:
dom.get_document().getElementById("testmain").innerHTML += "some error"
More information about the pytest-commit
mailing list