Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doc error in fixtures section #2201

Closed
borisozegovic opened this issue Jan 17, 2017 · 4 comments
Closed

Doc error in fixtures section #2201

borisozegovic opened this issue Jan 17, 2017 · 4 comments

Comments

@borisozegovic
Copy link

In section 'Parametrizing fixtures' all instances have the same address (0xdeadbeef). The text below 'example box' is correct and it states there should be two different instances.

http://doc.pytest.org/en/latest/fixture.html#fixtures

@nicoddemus
Copy link
Member

Hah, I was suspicious that deadbeef was too funny to be accidental. 😆

All address are replaced by deadbeef by regendoc, so this is actually a feature. 😉

@RonnyPfannschmidt
Copy link
Member

this is indeed a feature for the documentation, we replace all memory addresses,

but tbh imho its a bug we have all those reprs with random addresses instead of meaningfull data

@nicoddemus
Copy link
Member

Closing this then. 👍

@EdwardBlair
Copy link

EdwardBlair commented Aug 30, 2021

Reopen.

Something to be aware of when grouping tests inside classes is that each test has a unique instance of the class. Having each test share the same class instance would be very detrimental to test isolation and would promote poor test practices. This is outlined below

And then shows the same address instance being used is very confusing.

I see this was fixed uh... somewhere

https://github.com/pytest-dev/pytest/blob/771c4b9313f5a4201a131845b99e9ea08030cc5f/doc/en/getting-started.rst

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants