mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Dont import unittest when not running tests
This commit is contained in:
parent
8160a8d9c8
commit
8ccb974a61
@ -8,7 +8,7 @@ __docformat__ = 'restructuredtext en'
|
||||
lxml based OPF parser.
|
||||
'''
|
||||
|
||||
import re, sys, unittest, functools, os, uuid, glob, io, json, copy
|
||||
import re, sys, functools, os, uuid, glob, io, json, copy
|
||||
|
||||
from lxml import etree
|
||||
|
||||
@ -1742,6 +1742,9 @@ def test_m2o():
|
||||
print('!=', newmi.get_identifiers())
|
||||
|
||||
|
||||
def suite():
|
||||
import unittest
|
||||
|
||||
class OPFTest(unittest.TestCase):
|
||||
|
||||
def setUp(self):
|
||||
@ -1808,12 +1811,11 @@ b'''\
|
||||
self.opf.smart_update(MetaInformation(self.opf))
|
||||
self.testReading()
|
||||
|
||||
|
||||
def suite():
|
||||
return unittest.TestLoader().loadTestsFromTestCase(OPFTest)
|
||||
|
||||
|
||||
def test():
|
||||
import unittest
|
||||
unittest.TextTestRunner(verbosity=2).run(suite())
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user