[py-svn] r34965 - py/dist/py/test/rsession/testing
fijal at codespeak.net
fijal at codespeak.net
Sat Nov 25 16:23:04 CET 2006
Author: fijal
Date: Sat Nov 25 16:23:02 2006
New Revision: 34965
Modified:
py/dist/py/test/rsession/testing/test_webjs.py
Log:
Added (partly failing) test. Guido please investigate failure.
Modified: py/dist/py/test/rsession/testing/test_webjs.py
==============================================================================
--- py/dist/py/test/rsession/testing/test_webjs.py (original)
+++ py/dist/py/test/rsession/testing/test_webjs.py Sat Nov 25 16:23:02 2006
@@ -64,3 +64,25 @@
assert tr.childNodes[1].nodeName == 'TABLE'
assert len(tr.childNodes[1].getElementsByTagName('tr')) == 0
+def test_process_two():
+ main_t = dom.window.document.getElementById('main_table')
+ msg = {'type': 'ItemStart',
+ 'itemtype': 'Module',
+ 'itemname': 'foo.py',
+ 'fullitemname': 'modules/foo.py',
+ 'length': 10,
+ }
+ webjs.process(msg)
+ msg = {'type': 'ReceivedItemOutcome',
+ 'fullmodulename': 'modules/foo.py',
+ 'passed' : 'True',
+ 'fullitemname' : 'modules/foo.py/test_item',
+ }
+ webjs.process(msg)
+ trs = main_t.getElementsByTagName('tr')
+ tds = trs[0].getElementsByTagName('td')
+ assert len(tds) == 2
+ # XXX: This assert obviously is true in output code, why it does not work?
+ #assert tds[0].innerHTML == 'foo.py[1/10]'
+ assert tds[1].innerHTML == '.'
+
More information about the pytest-commit
mailing list