Modify ↓
Opened 9 years ago
Closed 9 years ago
#12456 closed defect (fixed)
AssertionError: "<MODULE.eh_ix object at 0xADDRESS (repr() error: TypeError: unsupported operand type(s) for +: 'int' and 'str')>"
Reported by: | Ryan J Ollos | Owned by: | Ryan J Ollos |
---|---|---|---|
Priority: | normal | Milestone: | 1.0.11 |
Component: | general | Version: | |
Severity: | normal | Keywords: | tests |
Cc: | Branch: | ||
Release Notes: |
Fixed test failures when running |
||
API Changes: | |||
Internal Changes: |
Description
Unit test fails when running tests for just the module, but passes when running the entire suite (make unit-test
).
$make test=trac/util/tests/__init__ Python: /Users/rjollos/Documents/Workspace/trac-dev/pve/bin/python Package Version ---------------------------------------------------------------------------------------------------------------- Python : 2.7.11 (default, Dec 5 2015, 14:44:53) [GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] Setuptools : 20.6.7 Genshi : 0.6.1 Babel : 2.3.2 sqlite3 : 2.6.0 (3.12.1) PySqlite : 2.8.1 (3.8.10.2) MySQLdb : 1.2.5 Psycopg2 : 2.6.1 (dt dec pq3 ext lo64) SVN bindings : 1.9.3 (r1718519) Mercurial : 3.7.2 Pygments : 2.1.3 Textile : 2.2.2 Pytz : 2016.3 Docutils : 0.12 Twill : 0.9 LXML : 3.5.0 coverage : 4.0.3 figleaf : 0.6.1 Variables: PATH=::$PATH PYTHONPATH=.::$PYTHONPATH TRAC_TEST_DB_URI= server-options= -p 8000 -a '*,/Users/rjollos/Documents/Workspace/trac-dev/tracenvs/htdigest.trac,trac' -r -e /Users/rjollos/Documents/Workspace/trac-dev/tracenvs External dependencies: -n Git version: git version 2.8.1 python setup.py -q test -s trac.util.tests.__init__.suite ...........F......................................................................................................................................................................................................................................... ====================================================================== FAIL: test_buggy_repr (trac.util.tests.__init__.SafeReprTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/util/tests/__init__.py", line 182, in test_buggy_repr "type(s) for +: 'int' and 'str')>", sr) AssertionError: "<MODULE.eh_ix object at 0xADDRESS (repr() error: TypeError: unsupported operand type(s) for +: 'int' and 'str')>" != u"<MODULE.__init__.eh_ix object at 0xADDRESS (repr() error: TypeError: unsupported operand type(s) for +: 'int' and 'str')>" ---------------------------------------------------------------------- Ran 245 tests in 1.040s FAILED (failures=1) make: *** [all] Error 1
Attachments (0)
Change History (4)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Another failure:
$python trac/ticket/tests/default_workflow.py E. ====================================================================== ERROR: test_custom_reset_action (__main__.ResetActionTestCase) Custom reset action in [ticket-workflow] section. ---------------------------------------------------------------------- Traceback (most recent call last): File "trac/ticket/tests/default_workflow.py", line 65, in test_custom_reset_action self.perm_sys.grant_permission('user2', 'TICKET_BATCH_MODIFY') File "/Users/rjollos/Documents/Workspace/trac-dev/teo-rjollos.git/trac/perm.py", line 349, in grant_permission raise TracError(_('%(name)s is not a valid action.', name=action)) TracError: TICKET_BATCH_MODIFY is not a valid action. ---------------------------------------------------------------------- Ran 2 tests in 0.038s
The tests don't fail when run using make test=trac/ticket/tests/default_workflow.py
.
Proposed fix:
-
trac/ticket/tests/default_workflow.py
diff --git a/trac/ticket/tests/default_workflow.py b/trac/ticket/tests/default_workflow.py index c1befc0..cb52212 100644
a b import trac.tests.compat 17 17 from trac.perm import PermissionCache, PermissionSystem 18 18 from trac.test import EnvironmentStub, Mock 19 19 from trac.ticket.api import TicketSystem 20 from trac.ticket.batch import BatchModifyModule 20 21 from trac.ticket.model import Ticket 21 22 22 23
comment:3 by , 9 years ago
Looks good to me. Confirmed with:
$ git grep -l '^def suite():' | sed -e '\!^trac/test[.s]!d' | xargs make
comment:4 by , 9 years ago
Release Notes: | modified (diff) |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Note:
See TracTickets
for help on using tickets.
Proposed change:
trac/util/tests/__init__.py
', 'MODULE', sr)