Skip to content

Commit

Permalink
Fixes oppia#5761: --test_target flag will redirect to its test file. (o…
Browse files Browse the repository at this point in the history
…ppia#6014)

* Fixes:5761 test_target issue

* Corrected the if

* Added the warning message

* Changed the warning message

* changed . to -
  • Loading branch information
anubhavsinha98 authored and apb7 committed Dec 22, 2018
1 parent cd180b2 commit 02995f8
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion scripts/backend_tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,17 @@ def main():
raise Exception('The delimiter in test_target should be a dot (.)')

if parsed_args.test_target:
all_test_targets = [parsed_args.test_target]
if parsed_args.test_target.endswith('_test'):
all_test_targets = [parsed_args.test_target]
else:
print ''
print '---------------------------------------------------------'
print 'WARNING : test_target flag should point to the test file.'
print '---------------------------------------------------------'
print ''
time.sleep(3)
print 'Redirecting to its corresponding test file...'
all_test_targets = [parsed_args.test_target + '_test']
else:
include_load_tests = not parsed_args.exclude_load_tests
all_test_targets = _get_all_test_targets(
Expand Down

0 comments on commit 02995f8

Please sign in to comment.