New submission from Kouki Hashimoto <hsm...@gmail.com>: Hello. I found a bug in unittest sample code. http://docs.python.org/dev/py3k/library/unittest.html#unittest-minimal-example (naming this code as test_sample.py)
I got this error. $ python3.2 test_sample.py ..E ====================================================================== ERROR: test_shuffle (__main__.TestSequenceFunctions) ---------------------------------------------------------------------- Traceback (most recent call last): File "test_sample.py", line 11, in test_shuffle random.shuffle(self.seq) File "/opt/local/Library/Frameworks/Python.framework/Versions/3.1/lib/python3.1/random.py", line 270, in shuffle x[i], x[j] = x[j], x[i] TypeError: 'range' object does not support item assignment ---------------------------------------------------------------------- Ran 3 tests in 0.004s I think this code should be fixed with attached patch. Regards. ---------- assignee: georg.brandl components: Documentation files: unittest.rst.patch keywords: patch messages: 90907 nosy: georg.brandl, hsmtkk severity: normal status: open title: unittest document bug (random.shuffle sequence) versions: Python 3.2 Added file: http://bugs.python.org/file14563/unittest.rst.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue6569> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com