Skip to content

switching _pytest.code to new style classes broke the api #2398

Closed
@RonnyPfannschmidt

Description

@RonnyPfannschmidt

@nicoddemus @hpk42 this one is fun

due to

>>> class a:
...  pass
... 
>>> a()[1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: a instance has no attribute '__getitem__'
>>> class b(object): pass
... 
>>> b()[1]
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'b' object does not support indexing
>>> 

we changed the behaviour of feature detection on report.long_repr

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: criticalgrave problem or usability issue that affects lots of userstype: backward compatibilitymight present some backward compatibility issues which should be carefully noted in the changelogtype: regressionindicates a problem that was introduced in a release which was working previously

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions