Skip to content

Commit

Permalink
Move TEST_ISBNS importing to TEST_EXTRAGLOBS.
Browse files Browse the repository at this point in the history
  • Loading branch information
James Rowe authored and JNRowe committed Apr 26, 2009
1 parent 1c356ec commit 3585238
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
5 changes: 4 additions & 1 deletion __pkg_data__.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,10 @@

GRAPH_TYPE = None

TEST_EXTRAGLOBS = []
from test import isbns
TEST_EXTRAGLOBS = {
"TEST_ISBNS": isbns.TEST_ISBNS,
}

SCM = "git"

7 changes: 4 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,11 +466,12 @@ def initialize_options(self):
self.exit_on_fail = False
self.doctest_opts = doctest.REPORT_UDIFF|doctest.NORMALIZE_WHITESPACE
self.extraglobs = {
"TEST_ISBNS": test.TEST_ISBNS,
"urllib": test.mock.urllib,
} #: Mock objects to include for test framework
if hasattr(__pkg_data__, "TEST_EXTRAGLOBS"):
for value in __pkg_data__.TEST_EXTRAGLOBS:
self.extraglobs[value] = getattr(test.mock, value)
for key, value in __pkg_data__.TEST_EXTRAGLOBS.items():
self.extraglobs[key] = value if value else getattr(test.mock,
key)

def run(self):
"""Run doctest tests"""
Expand Down

0 comments on commit 3585238

Please sign in to comment.