Examples from https://stackoverflow.com/questions/69152143/private-attributes-in-pydantic
I added the bottom two tests in test.py
, while post_pydantic.py
is unmodified from https://stackoverflow.com/a/71742829/10778553
Output from running pytest looks like
$ pytest test.py
======================================================================================================================== test session starts =========================================================================================================================
platform win32 -- Python 3.9.1, pytest-7.1.2, pluggy-1.0.0