8000 Is pytest output guaranteed to contain test file paths to relative to cwd · Issue #7463 · pytest-dev/pytest · GitHub
[go: up one dir, main page]

Skip to content
Is pytest output guaranteed to contain test file paths to relative to cwd #7463
@karrtikr

Description

@karrtikr

For instance, in my case I had run the following command and got this output

C:\Users\karraj\AppData\Local\Programs\Python\Python37\python.exe c:\Users\karraj\Desktop\vscode-python\pythonFiles\pyvsc-run-isolated.py pytest --override-ini junit_family=xunit1 --rootdir c:\Users\karraj\Desktop\Desktop\test_demo --junit-xml=C:\Users\karraj\AppData\Local\Temp\tmp-41724BpAkWghx9dx.xml Tests/steve
================================== FAILURES ===================================
_______________________ FailingTests.test_failure_still _______________________

self = <hello_test.FailingTests testMethod=test_failure_still>

    def test_failure_still(self):
>       self.assertEqual("I'm right!", "no, I am!")
E       AssertionError: "I'm right!" != 'no, I am!'
E       - I'm right!
E       + no, I am!

Tests\steve\hello_test.py:6: AssertionError
- generated xml file: C:\Users\karraj\AppData\Local\Temp\tmp-4172kPl1yrfyWOkV.xml -
============================== 1 failed in 0.12s ==============================

Tests\steve\hello_test.py is not the absolute path here, but the path relative to my current working directory. Is it guaranteed to contain relative paths always?

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questiongeneral question, might be closed after 2 weeks of inactivity

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0