File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,12 +118,22 @@ set to regenerate test data for specific tests like this:
118118
119119This command will only regenerate test data for only the tests in `test_package_models.py `,
120120and we can further specify the tests to regen by using more pytest options like `--lf ` and
121- `-k test_instances `.
121+ `-k test_instances `.
122122
123123If test data is regenerated, it is important to review the diff for test files and
124124carefully go through all of it to make sure there are no unintended changes there,
125125and then commit all the regenerated test data.
126126
127+ To help debug in scancode, we use logging. There are different environement variables
128+ you need to set to turn on logging. In packagedcode::
129+
130+ ``SCANCODE_DEBUG_PACKAGE=yes pytest -vvs tests/packagedcode/ --lf ``
131+
132+ Or set the ``TRACE `` variable to ``True ``. This enables ``logger_debug `` functions
133+ logging variables and shows code execution paths by logging and printing the logs
134+ in the terminal. If debugging full scans run by click, you have to raise exceptions
135+ in addition to setting the TRACE to enable logging.
136+
127137.. _scancode_toolkit_development_thirdparty_libraries :
128138
129139Thirdparty libraries and dependencies management
You can’t perform that action at this time.
0 commit comments