mirror of https://github.com/zulip/zulip.git
testing: Fix search key.
The problem this commit solves is related to how we search for testcases in the test files. We use a simple 'search_key' in file_data. This will return a false positive if there is a 'longer_search_key' in file_data. While searching for TestCases we should use a longer key to remove the possibility of collision. Using 'class TestCase(' should be precise enough. Fixes #4983
This commit is contained in:
parent
f1b3e943c6
commit
bccd2caacb
|
@ -236,7 +236,7 @@ if __name__ == "__main__":
|
||||||
classname = suite.rsplit('.', 1)[0]
|
classname = suite.rsplit('.', 1)[0]
|
||||||
rewrite_arguments(classname)
|
rewrite_arguments(classname)
|
||||||
elif suite[0].isupper():
|
elif suite[0].isupper():
|
||||||
rewrite_arguments(suite)
|
rewrite_arguments('class %s(' % (suite,))
|
||||||
|
|
||||||
for suite in args:
|
for suite in args:
|
||||||
if suite.startswith('test'):
|
if suite.startswith('test'):
|
||||||
|
|
Loading…
Reference in New Issue