Skip to content

Commit ee3aa67

Browse files
author
Neil Grey
committed
For #34500 : Updating value checking syntax for brevity
1 parent 36f6b6b commit ee3aa67

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

tests/base.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -292,13 +292,8 @@ def __init__(self):
292292
# Look for any environment variables that match our test
293293
# configuration naming of "SG_{KEY}". Default is None.
294294
value = os.environ.get('SG_%s' % (str(key).upper()))
295-
296295
if key in ['mock']:
297-
if value == None or str(value).lower() in ['true','1']:
298-
value = True
299-
else:
300-
value = False
301-
296+
value = (value == None) or (str(value).lower() in ['true','1']):
302297
setattr(self, key, value)
303298

304299
def config_keys(self):

0 commit comments

Comments
 (0)