Print statements in the test or source code being tested will cause cricket to stop working and throw the following exception.
Traceback (most recent call last):
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 1473, in __call__
return self.func(*args)
File "/usr/lib/python2.7/lib-tk/Tkinter.py", line 534, in callit
func(*args)
File "/home/benk/workspace/swcc/VirtualEnv/local/lib/python2.7/site-packages/cricket/view.py", line 706, in on_testProgress
if self.executor and self.executor.poll():
File "/home/benk/workspace/swcc/VirtualEnv/local/lib/python2.7/site-packages/cricket/executor.py", line 133, in poll
post = json.loads(self.buffer[1])
File "/usr/lib/python2.7/json/__init__.py", line 338, in loads
return _default_decoder.decode(s)
File "/usr/lib/python2.7/json/decoder.py", line 365, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python2.7/json/decoder.py", line 383, in raw_decode
raise ValueError("No JSON object could be decoded")
ValueError: No JSON object could be decoded
The Test being run is
from django.core.urlresolvers import reverse
from django.utils import unittest
from django.test.client import Client
class StaticPageTestCase(unittest.TestCase):
def setUp(self):
self.client = Client()
def test_disclaimer_page(self):
self.client.login(username='admin', password='password')
"""Disclaimer page can be rendered."""
response = self.client.get(reverse('disclaimer'))
self.assertEqual(response.status_code, 200)
print 'fozzy'
The contents of the buffer on executor.py line 133 is
Print statements in the test or source code being tested will cause cricket to stop working and throw the following exception.
The Test being run is
The contents of the buffer on executor.py line 133 is
A possible (temporary) workaround is to modify line 133 of executor.py to read