dd-trace-py
dd-trace-py copied to clipboard
CI Visibility: source code integration file path incorrect when not running tests from repo root
Summary of problem
Note: this issue is tracked internally for Datadog with CIVIS-8556, this issue is for external visibility.
When running tests using the pytest
or unittest
integration, filenames (that show up under the "source code" section of test events) are relative to the current directory (or for pytest
, the rootdir
).
They should be relative to the repo root.
Which version of dd-trace-py are you using?
ddtrace>=2.2.0
where feature was introduced.
Which version of pip are you using?
Not relevant.
Which libraries and their versions are you using?
Not relevant.
How can we reproduce your problem?
Run tests from a directory other than the repo root.
What is the result that you get?
File paths relative to the current directory.
What is the result that you expected?
File paths relative to the repo root.
#9586 should address this.