Get print to work in test_build

This commit is contained in:
Kovid Goyal 2021-12-18 16:53:14 +05:30
parent e399c05ec4
commit a01fb4ee57
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

View file

@ -9,7 +9,7 @@
Test a binary calibre build to ensure that all needed binary images/libraries have loaded.
'''
import os, ctypes, sys, unittest, time, shutil
import os, ctypes, sys, unittest, time, shutil, builtins
from calibre.constants import iswindows, islinux, ismacos, plugins_loc
from polyglot.builtins import iteritems
@ -18,6 +18,10 @@
is_sanitized = 'libasan' in os.environ.get('LD_PRELOAD', '')
def print(*a):
builtins.print(*a, flush=True, file=sys.__stdout__)
class BuildTest(unittest.TestCase):
@unittest.skipUnless(iswindows and not is_ci, 'DLL loading needs testing only on windows (non-continuous integration)')