File tree Expand file tree Collapse file tree 2 files changed +7
-3
lines changed
Expand file tree Collapse file tree 2 files changed +7
-3
lines changed Original file line number Diff line number Diff line change 44import unittest
55import re
66import sys
7+ import os
78import glob
89
910import helper
@@ -235,6 +236,7 @@ def say_something_zenlike(self):
235236
236237 def total_lessons (self ):
237238 all_lessons = self .filter_all_lessons ()
239+
238240 if all_lessons :
239241 return len (all_lessons )
240242 else :
@@ -244,10 +246,10 @@ def total_koans(self):
244246 return self .tests .countTestCases ()
245247
246248 def filter_all_lessons (self ):
249+ cur_dir = os .path .split (os .path .realpath (__file__ ))[0 ]
247250 if not self .all_lessons :
248- self .all_lessons = glob .glob ('koans/about*.py' )
251+ self .all_lessons = glob .glob ('{0}/../ koans/about*.py' . format ( cur_dir ) )
249252 self .all_lessons = filter (lambda filename :
250253 "about_extra_credit" not in filename ,
251254 self .all_lessons )
252-
253255 return self .all_lessons
Original file line number Diff line number Diff line change 33
44import unittest
55import re
6+ import os
67import glob
78
89from . import helper
@@ -243,8 +244,9 @@ def total_koans(self):
243244 return self .tests .countTestCases ()
244245
245246 def filter_all_lessons (self ):
247+ cur_dir = os .path .split (os .path .realpath (__file__ ))[0 ]
246248 if not self .all_lessons :
247- self .all_lessons = glob .glob ('koans/about*.py' )
249+ self .all_lessons = glob .glob ('{0}/../ koans/about*.py' . format ( cur_dir ) )
248250 self .all_lessons = list (filter (lambda filename :
249251 "about_extra_credit" not in filename ,
250252 self .all_lessons ))
You can’t perform that action at this time.
0 commit comments