Skip to content

Commit 6456a1b

Browse files
authored
Create Env without default module args (#112)
1 parent 7ba8495 commit 6456a1b

File tree

3 files changed

+7
-4
lines changed

3 files changed

+7
-4
lines changed

RLTest/_version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11

22
# This attribute is the only one place that the version number is written down,
33
# so there is only one place to change it when the version number changes.
4-
__version__ = "0.3.0"
4+
__version__ = "0.3.1"

RLTest/env.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ def __init__(self, testName=None, testDescription=None, module=None,
162162
moduleArgs=None, env=None, useSlaves=None, shardsCount=None, decodeResponses=None,
163163
useAof=None, forceTcp=False, useTLS=False, tlsCertFile=None, tlsKeyFile=None,
164164
tlsCaCertFile=None, logDir=None, redisBinaryPath=None, dmcBinaryPath=None,
165-
redisEnterpriseBinaryPath=None):
165+
redisEnterpriseBinaryPath=None, noDefaultModuleArgs=False):
166166

167167
self.testName = testName if testName else '%s.%s' % (inspect.getmodule(inspect.currentframe().f_back).__name__, inspect.currentframe().f_back.f_code.co_name)
168168
self.testName = self.testName.replace(' ', '_')
@@ -171,7 +171,10 @@ def __init__(self, testName=None, testDescription=None, module=None,
171171
print(Colors.Gray('\tdescription: ' + testDescription))
172172

173173
self.module = fix_modules(module, Defaults.module)
174-
self.moduleArgs = fix_modulesArgs(self.module, moduleArgs, Defaults.module_args)
174+
if noDefaultModuleArgs:
175+
self.moduleArgs = fix_modulesArgs(self.module, moduleArgs)
176+
else:
177+
self.moduleArgs = fix_modulesArgs(self.module, moduleArgs, Defaults.module_args)
175178
self.env = env if env else Defaults.env
176179
self.useSlaves = useSlaves if useSlaves else Defaults.use_slaves
177180
self.shardsCount = shardsCount if shardsCount else Defaults.num_shards

RLTest/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def fix_modulesArgs(modules, modulesArgs, defaultArgs=None, haveSeqs=True):
9999
# semicolons can be escaped with a backslash.
100100
# arg list is a list of arg strings.
101101
# arg list starts with an arg name that can later be used for argument overriding.
102-
# arg strings are transformed into arg lists:
102+
# arg strings are transformed into arg lists (haveSeqs parameter controls this behavior):
103103
# thus, 'num 1; names a b' becomes ['num 1', 'names a b']
104104

105105
if type(modulesArgs) == str:

0 commit comments

Comments
 (0)