Permalink
Browse files

Move single use values into the function using them

  • Loading branch information...
1 parent d9e4a40 commit d5fe255d1025cbc7753d3fff0d51f60a95edc8fb @peterjc peterjc committed Dec 30, 2012
Showing with 3 additions and 7 deletions.
  1. +3 −7 Bio/_utils.py
View
@@ -9,10 +9,6 @@
import os
-TEST_DIR = 'Tests' # Biopython test directory name
-MOD_DIR = 'Bio' # Biopython main library directory name
-
-
def iterlen(items):
"""Count the number of items in an iterable.
@@ -71,10 +67,10 @@ def find_test_dir(start_dir=None):
target = os.path.abspath(start_dir)
while True:
- if os.path.isdir(os.path.join(target, MOD_DIR)) \
- and os.path.isdir(os.path.join(target, TEST_DIR)):
+ if os.path.isdir(os.path.join(target, "Bio")) \
+ and os.path.isdir(os.path.join(target, "Tests")):
#Good, we're in the Biopython root now
- return os.path.abspath(os.path.join(target, TEST_DIR))
+ return os.path.abspath(os.path.join(target, "Tests"))
#Recurse up the tree
#TODO - Test this on Windows
new, tmp = os.path.split(target)

0 comments on commit d5fe255

Please sign in to comment.