diff options
author | Sylvain <syt@logilab.fr> | 2009-03-04 11:54:23 +0100 |
---|---|---|
committer | Sylvain <syt@logilab.fr> | 2009-03-04 11:54:23 +0100 |
commit | b2a6afa68ec49734659ceeb7961218cf5f17b204 (patch) | |
tree | f810b5d258b2ee0defd451c26f2ef73ea9465dae /test/unittest_table.py | |
parent | 1f235a7313bba3369d109bc1eb9996a6963ef134 (diff) | |
download | logilab-common-b2a6afa68ec49734659ceeb7961218cf5f17b204.tar.gz |
toward py3k
passing tests: unittest_shellutils, unittest_textutils, unittest_modutils, unittest_table, unittest_tree
Diffstat (limited to 'test/unittest_table.py')
-rw-r--r-- | test/unittest_table.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/test/unittest_table.py b/test/unittest_table.py index d41c646..cd2e9a5 100644 --- a/test/unittest_table.py +++ b/test/unittest_table.py @@ -2,11 +2,12 @@ Unittests for table management """ -__revision__ = '$Id: unittest_table.py,v 1.13 2006-04-09 22:30:53 nico Exp $' - import sys import os -from cStringIO import StringIO +try: + from cStringIO import StringIO +except ImportError: + from io import StringIO from logilab.common.testlib import TestCase, unittest_main from logilab.common.table import Table, TableStyleSheet, DocbookTableWriter, \ @@ -55,8 +56,8 @@ class TableTC(TestCase): def test_iterable(self): """test iter(table)""" it = iter(self.table) - self.assert_(it.next() == self.table.data[0]) - self.assert_(it.next() == self.table.data[1]) + self.assert_(next(it) == self.table.data[0]) + self.assert_(next(it) == self.table.data[1]) def test_get_rows(self): """tests Table.get_rows()""" |