Skip to content

Refactor pytest discovery code in extension to use python #4035

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DonJayamanne opened this issue Jan 17, 2019 · 1 comment
Closed

Refactor pytest discovery code in extension to use python #4035

DonJayamanne opened this issue Jan 17, 2019 · 1 comment

Comments

@DonJayamanne
Copy link

DonJayamanne commented Jan 17, 2019

Recommendation is to ensure output of Python part of the code returns JSON format to the extension.

@DonJayamanne DonJayamanne added area-testing needs PR debt Covers everything internal: CI, testing, refactoring of the codebase, etc. labels Jan 17, 2019
@ghost ghost added the triage-needed Needs assignment to the proper sub-team label Jan 17, 2019
@d3r3kk d3r3kk removed the triage-needed Needs assignment to the proper sub-team label Jan 17, 2019
d3r3kk added a commit to d3r3kk/vscode-python that referenced this issue Jan 23, 2019
For microsoft#4035

- Handles stdout produced by pytest in the 4.0 and 4.1 series
@ericsnowcurrently ericsnowcurrently removed their assignment Jan 30, 2019
@DonJayamanne
Copy link
Author

  • Modify discoverTests of src/client/unittests/pytest/services/discoveryService.ts
  • Call into python file written by @ericsnowcurrently
  • Convert output into Tests structure

d3r3kk added a commit to d3r3kk/vscode-python that referenced this issue Feb 21, 2019
For microsoft#4035

- Handles stdout produced by pytest in the 4.0 and 4.1 series
d3r3kk added a commit to d3r3kk/vscode-python that referenced this issue Mar 7, 2019
For microsoft#4035

- Handles stdout produced by pytest in the 4.0 and 4.1 series
@DonJayamanne DonJayamanne self-assigned this Mar 13, 2019
ericsnowcurrently added a commit that referenced this issue Mar 18, 2019
(for #4035)

We are moving to a relatively flat format that captures parent "nodes", in addition to tests. The new format looks like this:

```json
[{
    "rootid": ".",
    "root": "/x/y/z",
    "parents": [{
        "id": "./test_spam.py",
        "kind": "file",
        "name": "test_spam.py",
        "parentid": "."
    }, {
        "id": "./test_spam.py::SpamTests",
        "kind": "suite",
        "name": "SpamTests",
        "parentid": "./test_spam.py"
    },
    "tests" [{
        "id": "./test_spam.py::test_all",
        "name": "test_all",
        "source": "test_spam.py:11",
        "markers": ["skip", "expected-failure"],
        "parentid": "./test_spam.py"
    }, {
        "id": "./test_spam.py::SpamTests::test_spam1",
        "name": "test_spam1",
        "source": "test_spam.py:23",
        "markers": ["skip"],
        "parentid": "./test_spam.py::SpamTests"
    }]
```

This also fixes a couple of bugs that I found while working on the change.
@DonJayamanne DonJayamanne removed the debt Covers everything internal: CI, testing, refactoring of the codebase, etc. label Mar 25, 2019
@DonJayamanne DonJayamanne removed this from the 2019, week 11 - March Sprint 6 milestone Mar 27, 2019
DonJayamanne added a commit that referenced this issue Apr 11, 2019
@ghost ghost removed the needs PR label Apr 17, 2019
@lock lock bot locked as resolved and limited conversation to collaborators May 15, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants