From: Douglas Bagnall Date: Wed, 6 Sep 2023 23:19:21 +0000 (+1200) Subject: pytest: sddl tests can be only externally defined X-Git-Tag: tevent-0.16.0~453 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2f30103f922e755901132600cc8ea6924df0e75c;p=thirdparty%2Fsamba.git pytest: sddl tests can be only externally defined Currently a test suite needs a strings list in order to import new strings. This lets us avoid that and have the actual tests defined only in external lists, making it easier to see we're testing the same thing on Windows and reducing duplication. Signed-off-by: Douglas Bagnall Reviewed-by: Andrew Bartlett --- diff --git a/python/samba/tests/sddl.py b/python/samba/tests/sddl.py index da755904a77..8cc3ac9844c 100644 --- a/python/samba/tests/sddl.py +++ b/python/samba/tests/sddl.py @@ -149,6 +149,9 @@ class SddlDecodeEncodeBase(TestCase): """ filename = f"{dir}/{cls.name}.txt" + if not hasattr(cls, 'strings'): + cls.strings = [] + old_pairs = set() for s in cls.strings: if isinstance(s, str):