]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
tests: minor indentation and whitespace fixes
authorRob van der Linde <rob@catalyst.net.nz>
Mon, 2 Oct 2023 05:27:39 +0000 (18:27 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Tue, 24 Oct 2023 23:31:29 +0000 (23:31 +0000)
Signed-off-by: Rob van der Linde <rob@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/__init__.py

index 14bf3295f07cc3530dde73d44af1affd769e7c99..f96ab068d3e52342357dec4243690845e0f2f7e6 100644 (file)
@@ -59,7 +59,8 @@ BINDIR = os.path.abspath(os.path.join(os.path.dirname(__file__),
 
 HEXDUMP_FILTER = bytearray([x if ((len(repr(chr(x))) == 3) and (x < 127)) else ord('.') for x in range(256)])
 
-LDB_ERR_LUT = {v: k for k,v in vars(ldb).items() if k.startswith('ERR_')}
+LDB_ERR_LUT = {v: k for k, v in vars(ldb).items() if k.startswith('ERR_')}
+
 
 def ldb_err(v):
     if isinstance(v, ldb.LdbError):
@@ -79,6 +80,7 @@ def DynamicTestCase(cls):
     cls.setUpDynamicTestCases()
     return cls
 
+
 class TestCase(unittest.TestCase):
     """A Samba test case."""
 
@@ -458,10 +460,10 @@ class BlackboxTestCase(TestCaseInTempDir):
         exe = os.path.join(BINDIR, cmd)
 
         python_cmds = ["samba-tool",
-            "samba_dnsupdate",
-            "samba_upgradedns",
-            "script/traffic_replay",
-            "script/traffic_learner"]
+                       "samba_dnsupdate",
+                       "samba_upgradedns",
+                       "script/traffic_replay",
+                       "script/traffic_learner"]
 
         if os.path.exists(exe):
             parts[0] = exe
@@ -531,8 +533,8 @@ class BlackboxTestCase(TestCaseInTempDir):
         password += SystemRandom().choice(string.digits)
         password += SystemRandom().choice(string.ascii_lowercase)
         password += ''.join(SystemRandom().choice(string.ascii_uppercase +
-                    string.ascii_lowercase +
-                    string.digits) for x in range(count - 3))
+                            string.ascii_lowercase +
+                            string.digits) for x in range(count - 3))
         return password
 
 
@@ -693,7 +695,7 @@ def parse_help_consistency(out,
         prev = ' '
         for c in line:
             if state == OptState.NOOPT:
-                if c == '-' and  prev.isspace():
+                if c == '-' and prev.isspace():
                     state = OptState.HYPHEN1
                 prev = c
                 continue
@@ -708,7 +710,7 @@ def parse_help_consistency(out,
                 if c.isalnum():
                     name = '--' + c
                     state = OptState.NAME
-                else: # WTF, perhaps '--' ending option list.
+                else:  # WTF, perhaps '--' ending option list.
                     state = OptState.NOOPT
                     prev = c
                 continue