Conversation
|
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
tests/data/drivers/test_drivers.py
Outdated
| from msticpy.data.drivers.mdatp_driver import MDATPDriver | ||
| from msticpy.data.drivers.security_graph_driver import SecurityGraphDriver | ||
|
|
||
| from msticpy.data.drivers.resource_graph_driver import ResourceGraphDriver |
There was a problem hiding this comment.
You might want to surround this with a try/except ImportError.
Not strictly necessary but I did this in other places - and then if the import fails have a pytest.mark.skip that causes the whole test to be skipped.
The advantage to this is that all the tests pass or are skipped even if all the extras are not installed. Otherwise you get a test error.
Looks like I didn't do this consistently - maybe I ended up thinking that test errors were OK and only did it where there were test files with some cases that worked with core install and some didn't.
If you want to see an example look at data/test_query_source and look for the import statements and @pytest.mark.skipif(not _SPLUNK_IMP_OK, reason="Partial msticpy install")
lines.
I don't think it's worth doing here - I didn't do it for the azure_data test and a bunch of others.
* Resource Graph Driver * Fix auth_method kwargs * Documentation, tests, minor fixes * Updated extras error message * requirements update and black formatting * updated setup * linting fixes * Docs update * version increase * Make test contingent on install Co-authored-by: Ryan Cobb <rcobb@secureworks.com> Co-authored-by: Ian Hellen <ianhelle@microsoft.com>
This is a local branch of PR 163 - created to work with our Pipeline.