Skip to content

Commit 158b936

Browse files
committed
Fixed running of contemplate_koans with 0 arguments. Made it so you multiple arguments run as one suite of tests
1 parent 6c66d44 commit 158b936

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

python2/runner/mountain.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ def __init__(self):
1313
self.stream = WritelnDecorator(sys.stdout)
1414
self.tests = path_to_enlightenment.koans()
1515
self.lesson = Sensei(self.stream)
16-
16+
1717
def walk_the_path(self, args=None):
1818
"Run the koans tests with a custom runner output."
19-
19+
2020
if args and len(args) >=2:
21-
args.pop(0)
22-
for arg in args:
23-
self.tests = unittest.TestLoader().loadTestsFromName("koans." + arg)
24-
self.tests(self.lesson)
25-
self.lesson.learn()
21+
args.pop(0)
22+
test_names = ["koans." + test_name for test_name in args]
23+
self.tests = unittest.TestLoader().loadTestsFromNames(test_names)
24+
self.tests(self.lesson)
25+
self.lesson.learn()
2626
return self.lesson

0 commit comments

Comments
 (0)