Fixed problems with the test_ibom_parse_fail test

- Needs to avoid iBoM using X server
- Python 3.7 optional parameter to the mocked function wasn't implemented
This commit is contained in:
Salvador E. Tropea 2022-06-30 11:38:22 -03:00
parent 33b2367a54
commit 29afcdd453
1 changed files with 2 additions and 1 deletions

View File

@ -30,7 +30,7 @@ mocked_call_enabled = False
# - Once we patched them using monkey patch the patch isn't reverted unless we load them again.
# I don't know the real reason, may be related to the way we load plug-ins.
# For this reason this patch is used for more than one case.
def mocked_check_output(cmd, stderr=None):
def mocked_check_output(cmd, stderr=None, text=False):
logging.debug('mocked_check_output called')
if mocked_check_output_FNF:
raise FileNotFoundError()
@ -160,6 +160,7 @@ def test_ibom_parse_fail(test_dir, caplog, monkeypatch):
# We will patch subprocess.check_output to make ibom fail
with monkeypatch.context() as m:
patch_functions(m)
os.environ['INTERACTIVE_HTML_BOM_NO_DISPLAY'] = 'True'
with context.cover_it(cov):
detect_kicad()
# Load the plug-ins