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 4
4
import unittest
5
5
import re
6
6
import sys
7
+ import os
7
8
import glob
8
9
9
10
import helper
@@ -235,6 +236,7 @@ def say_something_zenlike(self):
235
236
236
237
def total_lessons (self ):
237
238
all_lessons = self .filter_all_lessons ()
239
+
238
240
if all_lessons :
239
241
return len (all_lessons )
240
242
else :
@@ -244,10 +246,10 @@ def total_koans(self):
244
246
return self .tests .countTestCases ()
245
247
246
248
def filter_all_lessons (self ):
249
+ cur_dir = os .path .split (os .path .realpath (__file__ ))[0 ]
247
250
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 ) )
249
252
self .all_lessons = filter (lambda filename :
250
253
"about_extra_credit" not in filename ,
251
254
self .all_lessons )
252
-
253
255
return self .all_lessons
Original file line number Diff line number Diff line change 3
3
4
4
import unittest
5
5
import re
6
+ import os
6
7
import glob
7
8
8
9
from . import helper
@@ -243,8 +244,9 @@ def total_koans(self):
243
244
return self .tests .countTestCases ()
244
245
245
246
def filter_all_lessons (self ):
247
+ cur_dir = os .path .split (os .path .realpath (__file__ ))[0 ]
246
248
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 ) )
248
250
self .all_lessons = list (filter (lambda filename :
249
251
"about_extra_credit" not in filename ,
250
252
self .all_lessons ))
You can’t perform that action at this time.
0 commit comments