live_server = <LiveServer listening at http://localhost:6600>
event_loop = <_UnixSelectorEventLoop running=False closed=False debug=False>
test_sample_folder = PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_scanner_result_with_exclu0/sample-folder')
def test_scanner_result_with_exclude_patterns(
live_server, event_loop, test_sample_folder
):
api_url = live_server.url() + "/"
patterns = (str(test_sample_folder) + "/toexclude",)
exclude_pattern = {
reg_obj for reg_obj in extract_regex_objs(test_sample_folder, patterns)
}
source_tree = Tree(test_sample_folder)
event_loop.run_until_complete(
> run(test_sample_folder, api_url, source_tree, exclude_pattern)
)
.tox/py3/lib/python3.7/site-packages/swh/scanner/tests/test_scanner.py:98:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/lib/python3.7/asyncio/base_events.py:584: in run_until_complete
return future.result()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
config = PosixPath('/tmp/pytest-of-jenkins/pytest-0/test_scanner_result_with_exclu0/sample-folder')
root = 'http://localhost:6600/'
source_tree = <swh.scanner.model.Tree object at 0x7f93bc086dd8>
exclude_patterns = {re.compile('(?s:/tmp/pytest\\-of\\-jenkins/pytest\\-0/test_scanner_result_with_exclu0/sample\\-folder/toexclude)\\Z')}
async def run(
config: Dict[str, Any], root: Path, source_tree: Tree, exclude_patterns: Set[Any],
) -> None:
"""Start scanning from the given root.
It fills the source tree with the path discovered.
Args:
root: the root path to scan
api_url: url for the API request
"""
> api_url = config["web-client"]["api-url"]
E TypeError: 'PosixPath' object is not subscriptable
.tox/py3/lib/python3.7/site-packages/swh/scanner/scanner.py:165: TypeError
TEST RESULT
TEST RESULT
- Run At
- Sep 9 2020, 8:00 PM