cve-bin-tool
cve-bin-tool copied to clipboard
feat: basic tests for no-scan mode
Related Discussion : #5136
cc @terriko @anthonyharrison @mastersans
Re-running the tests with an empty commit because:
Looks like this might be the underlying issue that caused the failure:
test/test_no_scan.py::test_normal_scan
C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\site-packages\_pytest\threadexception.py:58: PytestUnhandledThreadExceptionWarning: Exception in thread Thread-5 (_readerthread)
Traceback (most recent call last):
File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\threading.py", line 1075, in _bootstrap_inner
self.run()
File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\threading.py", line 1012, in run
self._target(*self._args, **self._kwargs)
File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\subprocess.py", line 1599, in _readerthread
buffer.append(fh.read())
^^^^^^^^^
File "C:\hostedtoolcache\windows\Python\3.12.10\x64\Lib\encodings\cp1252.py", line 23, in decode
return codecs.charmap_decode(input,self.errors,decoding_table)[0]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
UnicodeDecodeError: 'charmap' codec can't decode byte 0x90 in position 21620: character maps to <undefined>
Possibly a text encoding problem on Windows?
BTW, the linters should be back up if you need them, but the rest of the tests are still failing due to the cache.
I'm going to update hte branch to see where we're at now.
=================================== FAILURES ===================================
________________ TestOutputHTML.test_modal_switching[chromium] _________________
[gw0] linux -- Python 3.13.7 /opt/hostedtoolcache/Python/3.13.7/x64/bin/python
self = <test.test_html.TestOutputHTML object at 0x7fe4dbc32710>
def test_modal_switching(self) -> None:
"""Test modal to be visible when clicked on the product row or the vendor_product pill
and to be hidden when clicked on the close button"""
modal_content = self.html_report_page.modal_content.nth(0)
product_row = self.html_report_page.product_rows.nth(0)
modal_close_button = self.html_report_page.modal_close_button.nth(0)
vendor_product_pill = self.html_report_page.vendor_product_pill.nth(0)
expect(modal_content).to_be_hidden()
product_row.click()
expect(modal_content).to_be_visible()
modal_close_button.click()
> expect(modal_content).to_be_hidden(timeout=10000)
E AssertionError: Locator expected to be hidden
E Actual value: visible
E Call log:
E - Expect "to_be_hidden" with timeout 10000ms
E - waiting for locator(".modal-content").first
E 14 × locator resolved to <div class="modal-content">…</div>
E - unexpected value "visible"
test/test_html.py:206: AssertionError
I do not understand what's going on here. @terriko @anthonyharrison