Opened 9 years ago

Closed 9 years ago

#690 closed defect (fixed)

python 3.5: smoketest.py fails due to changed AttributeError description text

Reported by: ususdei Owned by: Richard Boulton
Priority: normal Milestone: 1.3.4
Component: Xapian-bindings (Python) Version: 1.3.2
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

File: xapian-bindings/python3/smoketest.py

The description of AttributeError on modules has been changed, e.g. from

"object 'module' has no attribute %s"

to

"module 'xapian' has no attribute %s"

This leads to smoketest.py unneccessarily failing under python 3.5. Maybe expect_exception() should be slightly less restrictive?

Change History (5)

comment:1 by ususdei, 9 years ago

Component: OtherXapian-bindings (Python)
Keywords: python bindings test added
Milestone: 1.4.x
Owner: changed from Olly Betts to Richard Boulton
Version: 1.3.2

comment:2 by Olly Betts, 9 years ago

Keywords: python bindings test removed
Milestone: 1.4.x1.3.x

We don't want to skip checking the message, as then the test would pass if we got a different AttributeError to the one we expect.

But expected_exception() could accept either a string or a regular expression for expectedmsg.

comment:3 by Olly Betts, 9 years ago

Description: modified (diff)

comment:4 by ususdei, 9 years ago

That's also what I meant with "slightly less restrictive": Check against a regex or a set of keywords or something like that.

comment:5 by Olly Betts, 9 years ago

Milestone: 1.3.x1.3.4
Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.