forked from microsoft/vscode-python
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from eleanorjboyd/fix-main
fix main
- Loading branch information
Showing
128 changed files
with
4,122 additions
and
1,297 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
8 changes: 8 additions & 0 deletions
8
...pytestadapter/.data/double_nested_folder/nested_folder_one/nested_folder_two/test_nest.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
|
||
# This test's id is double_nested_folder/nested_folder_one/nested_folder_two/test_nest.py::test_function. | ||
# This test passes. | ||
def test_function(): # test_marker--test_function | ||
assert 1 == 1 |
14 changes: 14 additions & 0 deletions
14
...ests/pytestadapter/.data/dual_level_nested_folder/nested_folder_one/test_bottom_folder.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
|
||
# This test's id is dual_level_nested_folder/nested_folder_one/test_bottom_folder.py::test_bottom_function_t. | ||
# This test passes. | ||
def test_bottom_function_t(): # test_marker--test_bottom_function_t | ||
assert True | ||
|
||
|
||
# This test's id is dual_level_nested_folder/nested_folder_one/test_bottom_folder.py::test_bottom_function_f. | ||
# This test fails. | ||
def test_bottom_function_f(): # test_marker--test_bottom_function_f | ||
assert False |
14 changes: 14 additions & 0 deletions
14
pythonFiles/tests/pytestadapter/.data/dual_level_nested_folder/test_top_folder.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
|
||
# This test's id is dual_level_nested_folder/test_top_folder.py::test_top_function_t. | ||
# This test passes. | ||
def test_top_function_t(): # test_marker--test_top_function_t | ||
assert True | ||
|
||
|
||
# This test's id is dual_level_nested_folder/test_top_folder.py::test_top_function_f. | ||
# This test fails. | ||
def test_top_function_f(): # test_marker--test_top_function_f | ||
assert False |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
|
||
# This file has no tests in it; the discovery will return an empty list of tests. | ||
def function_function(string): | ||
return string |
10 changes: 10 additions & 0 deletions
10
pythonFiles/tests/pytestadapter/.data/error_parametrize_discovery.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
import pytest | ||
|
||
|
||
# This test has an error which will appear on pytest discovery. | ||
# This error is intentional and is meant to test pytest discovery error handling. | ||
@pytest.mark.parametrize("actual,expected", [("3+5", 8), ("2+4", 6), ("6*9", 42)]) | ||
def test_function(): | ||
assert True |
7 changes: 7 additions & 0 deletions
7
pythonFiles/tests/pytestadapter/.data/error_syntax_discovery.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
# This test has a syntax error. | ||
# This error is intentional and is meant to test pytest discovery error handling. | ||
def test_function() | ||
assert True |
10 changes: 10 additions & 0 deletions
10
pythonFiles/tests/pytestadapter/.data/parametrize_tests.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import pytest | ||
|
||
|
||
# Testing pytest with parametrized tests. The first two pass, the third fails. | ||
# The tests ids are parametrize_tests.py::test_adding[3+5-8] and so on. | ||
@pytest.mark.parametrize( # test_marker--test_adding | ||
"actual, expected", [("3+5", 8), ("2+4", 6), ("6+9", 16)] | ||
) | ||
def test_adding(actual, expected): | ||
assert eval(actual) == expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
|
||
|
||
# This test passes. | ||
def test_function(): # test_marker--test_function | ||
assert 1 == 1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
This is a doctest test which passes #test_marker--text_docstring.txt | ||
>>> x = 3 | ||
>>> x | ||
3 |
21 changes: 21 additions & 0 deletions
21
pythonFiles/tests/pytestadapter/.data/unittest_folder/test_add.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Copyright (c) Microsoft Corporation. All rights reserved. | ||
# Licensed under the MIT License. | ||
import unittest | ||
|
||
|
||
def add(a, b): | ||
return a + b | ||
|
||
|
||
class TestAddFunction(unittest.TestCase): | ||
# This test's id is unittest_folder/test_add.py::TestAddFunction::test_add_positive_numbers. | ||
# This test passes. | ||
def test_add_positive_numbers(self): # test_marker--test_add_positive_numbers | ||
result = add(2, 3) | ||
self.assertEqual(result, 5) | ||
|
||
# This test's id is unittest_folder/test_add.py::TestAddFunction::test_add_negative_numbers. | ||
# This test passes. | ||
def test_add_negative_numbers(self): # test_marker--test_add_negative_numbers | ||
result = add(-2, -3) | ||
self.assertEqual(result, -5) |
Oops, something went wrong.