mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Only run tinycss test suite if it is imported from the filesystem
Prevents failures when running --test-build on frozen installs
This commit is contained in:
parent
5cc46c24e4
commit
1a2773cd3f
@ -209,8 +209,9 @@ def test_tokenizer():
|
||||
from tinycss.tokenizer import c_tokenize_flat
|
||||
if c_tokenize_flat is None:
|
||||
raise ValueError('tinycss C tokenizer not loaded')
|
||||
from tinycss.tests.main import run_tests
|
||||
run_tests(for_build=True)
|
||||
import tinycss.tests.main as m
|
||||
if getattr(m, '__file__', None) and os.path.exists(m.__file__):
|
||||
m.run_tests(for_build=True)
|
||||
print('tinycss tokenizer OK!')
|
||||
|
||||
def test_netifaces():
|
||||
|
Loading…
x
Reference in New Issue
Block a user