Skip to content

Commit 0dd9acb

Browse files
committed
Fixed color initialization and koans filtering bugs for windows users
1 parent c093787 commit 0dd9acb

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

python 2/runner/sensei.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from runner import path_to_enlightenment
1111

1212
from libs.colorama import init, Fore, Style
13+
init() # init colorama
1314

1415
class Sensei(MockableTestResult):
1516
def __init__(self, stream):
@@ -239,6 +240,8 @@ def total_koans(self):
239240
def filter_all_lessons(self):
240241
if not self.all_lessons:
241242
self.all_lessons = glob.glob('koans/about*.py')
242-
self.all_lessons.remove('koans/about_extra_credit.py')
243-
243+
self.all_lessons = filter(lambda filename:
244+
"about_extra_credit" not in filename,
245+
self.all_lessons)
246+
244247
return self.all_lessons

python 3/runner/sensei.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
from runner import path_to_enlightenment
1111

1212
from libs.colorama import init, Fore, Style
13+
init() # init colorama
1314

1415
class Sensei(MockableTestResult):
1516
def __init__(self, stream):
@@ -239,6 +240,8 @@ def total_koans(self):
239240
def filter_all_lessons(self):
240241
if not self.all_lessons:
241242
self.all_lessons = glob.glob('koans/about*.py')
242-
self.all_lessons.remove('koans/about_extra_credit.py')
243+
self.all_lessons = list(filter(lambda filename:
244+
"about_extra_credit" not in filename,
245+
self.all_lessons))
243246

244-
return self.all_lessons
247+
return self.all_lessons

0 commit comments

Comments
 (0)