This commit is contained in:
Kovid Goyal 2016-06-21 22:42:49 +05:30
parent 01a71dbbb5
commit beb53457a8
3 changed files with 13 additions and 14 deletions

View File

@ -9,10 +9,6 @@ __docformat__ = 'restructuredtext en'
import unittest, os, argparse, time, functools, importlib import unittest, os, argparse, time, functools, importlib
try:
import init_calibre # noqa
except ImportError:
pass
def no_endl(f): def no_endl(f):
@functools.wraps(f) @functools.wraps(f)
@ -100,6 +96,10 @@ def run_tests(find_tests=find_tests):
r(verbosity=4).run(tests) r(verbosity=4).run(tests)
if __name__ == '__main__': if __name__ == '__main__':
try:
import init_calibre # noqa
except ImportError:
pass
from calibre.utils.config_base import reset_tweaks_to_default from calibre.utils.config_base import reset_tweaks_to_default
from calibre.ebooks.metadata.book.base import reset_field_metadata from calibre.ebooks.metadata.book.base import reset_field_metadata
reset_tweaks_to_default() reset_tweaks_to_default()

View File

@ -7,11 +7,6 @@ __license__ = 'GPL v3'
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>' __copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
try:
import init_calibre # noqa
except ImportError:
pass
import os, unittest, importlib import os, unittest, importlib
def find_tests(): def find_tests():
@ -24,6 +19,11 @@ def find_tests():
return unittest.TestSuite(suits) return unittest.TestSuite(suits)
if __name__ == '__main__': if __name__ == '__main__':
try:
import init_calibre # noqa
except ImportError:
pass
from calibre.db.tests.main import run_tests from calibre.db.tests.main import run_tests
run_tests(find_tests=find_tests) run_tests(find_tests=find_tests)

View File

@ -8,11 +8,6 @@ __copyright__ = '2015, Kovid Goyal <kovid at kovidgoyal.net>'
import unittest, os, argparse, time, functools, importlib import unittest, os, argparse, time, functools, importlib
try:
import init_calibre
del init_calibre
except ImportError:
pass
def no_endl(f): def no_endl(f):
@functools.wraps(f) @functools.wraps(f)
@ -102,6 +97,10 @@ def run_tests(find_tests=find_tests):
r(verbosity=4).run(tests) r(verbosity=4).run(tests)
if __name__ == '__main__': if __name__ == '__main__':
try:
import init_calibre # noqa
except ImportError:
pass
from calibre.utils.config_base import reset_tweaks_to_default from calibre.utils.config_base import reset_tweaks_to_default
from calibre.ebooks.metadata.book.base import reset_field_metadata from calibre.ebooks.metadata.book.base import reset_field_metadata
reset_tweaks_to_default() reset_tweaks_to_default()