[python-ldap] [PATCH] Tests: Don't overwrite the server attribute of parent class
michael at stroeder.com
Thu Nov 16 11:02:18 EST 2017
Miro Hrončok wrote:
> We'd find out that the code in
> Tests/t_ldapobject.py::Test01_SimpleLDAPObject overwrites the server
> attribute of parent class by calling SlapdTestCase.setUpClass()
> directly. This might in some cases be problematic, as described in ,
> a fix is to use super().
>  https://github.com/pyldap/pyldap/pull/122
Reading  it's my impression that you're relying on a false
assumption: Let me state very clear that each instance of SlapdTestCase
or a derived class is supposed to be used one-shot only and start its
isolated slapd process and tear it down later. All current tests are and
all future tests will be written based on this assumption.
Nevertheless I agree that the class method should not change the class.
> Attaching a patch for python-ldap. Source: 
>  https://github.com/pyldap/pyldap/pull/122#issuecomment-327441677
I wonder why you only tweaked t_ldapobject.py because the very same call
to SlapdTestCase.setUpClass() is also in t_cext.py.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 3829 bytes
Desc: S/MIME Cryptographic Signature
More information about the python-ldap