Skip to content

Pytest plugin cherrypick #20175

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
Closed
Show file tree
Hide file tree
Changes from 46 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
2faab05
setup file structure
Aug 24, 2022
68a6ff8
reverse dummy commit
Aug 24, 2022
ac8b269
stash to isolate error
eleanorjboyd Aug 25, 2022
48cfa47
fixing merge issues
eleanorjboyd Sep 7, 2022
cfe1379
pushing changes in order to rebase
eleanorjboyd Sep 7, 2022
27c6300
changes to discoverAdapter
eleanorjboyd Sep 7, 2022
72aad5a
extension is calling plugin
eleanorjboyd Sep 9, 2022
f56157b
comitting to rebase
eleanorjboyd Sep 9, 2022
bf89286
remove all files from pytest_adapter.py
eleanorjboyd Sep 9, 2022
7ec8c56
resolve conflicts accept all cur
Sep 9, 2022
57b6bc6
plugin args working, and tests collected in correct format
eleanorjboyd Sep 9, 2022
ecb2a2f
attempting port
eleanorjboyd Sep 16, 2022
7fd8315
fixing settings
eleanorjboyd Sep 16, 2022
3e2f1c9
continue
Sep 13, 2022
92bc0e0
Ensure interpreter quickpick is initialized synchronously (#19828)
Sep 13, 2022
c11c547
Ensure we start watching environments when activating discovery compo…
Sep 13, 2022
d7eaa05
Ensure an environment is only reported after the final type of enviro…
Sep 14, 2022
60de7a1
Simplify buffer decoder. (#19836)
karthiknadig Sep 14, 2022
212d58a
cherry pick cont
paulacamargo25 Sep 15, 2022
dcb0561
cherry pick
karthiknadig Sep 23, 2022
883dd85
Temporarily expose `PYTHONPATH` for Pylance (#19899)
Sep 27, 2022
75bfc97
Only log deprecation warning once for each extension (#19901)
Sep 27, 2022
adac2f6
Improve keyword hover information displayed when using Jedi (#19926)
luabud Oct 3, 2022
69abfcd
cherry
karthiknadig Oct 3, 2022
82abb1e
formatting discovery
eleanorjboyd Sep 16, 2022
0e96dae
port posting working
eleanorjboyd Sep 19, 2022
597c3f3
stashing for testing
eleanorjboyd Sep 22, 2022
8b1aeaf
saving changes
eleanorjboyd Oct 12, 2022
097c4e0
tests showing in explorer panel
eleanorjboyd Oct 14, 2022
33209e3
remove old code
eleanorjboyd Oct 14, 2022
c14c828
broke apart algo into functions
eleanorjboyd Oct 14, 2022
ea3da6d
with unittest
eleanorjboyd Oct 14, 2022
3edc6ce
fix extra nesting paths
eleanorjboyd Oct 14, 2022
dbdebab
add general search method
eleanorjboyd Oct 14, 2022
5284ad9
add example
eleanorjboyd Nov 7, 2022
400ae9f
undo all changes to src
eleanorjboyd Nov 7, 2022
7e3b44b
remove non src file
eleanorjboyd Nov 7, 2022
568bfa9
name changes
eleanorjboyd Nov 7, 2022
cc2bfa6
rename and delete files
eleanorjboyd Nov 7, 2022
0354dd9
remove unnecessary files
eleanorjboyd Nov 7, 2022
988ce2f
remove unneeded files
eleanorjboyd Nov 7, 2022
f76a791
Merge branch 'main' into pytest_plugin_cherrypick
eleanorjboyd Nov 7, 2022
0e35387
fix black formatting
eleanorjboyd Nov 7, 2022
2597e29
Merge branch 'main' into pytest_plugin_cherrypick
eleanorjboyd Nov 10, 2022
9b5b534
remove unneeded files
eleanorjboyd Nov 10, 2022
a4f339f
Merge branch 'main' into pytest_plugin_cherrypick
eleanorjboyd Nov 11, 2022
fa3949d
Update pythonFiles/pytest-vscode-integration/tests/test_vscode_integr…
eleanorjboyd Nov 21, 2022
1dafafc
Update pythonFiles/pytest-vscode-integration/tests/test_vscode_integr…
eleanorjboyd Nov 21, 2022
fdf756b
Update pythonFiles/pytest-vscode-integration/tests/test_vscode_integr…
eleanorjboyd Nov 21, 2022
cb0202f
Update pythonFiles/pytest-vscode-integration/tests/test_vscode_integr…
eleanorjboyd Nov 21, 2022
519ea9a
stage 1 changes
eleanorjboyd Nov 21, 2022
acc32ec
Merge branch 'main' into pytest_plugin_cherrypick
eleanorjboyd Jan 11, 2023
1894fae
remove unneeded files
eleanorjboyd Jan 18, 2023
db5bb5e
Merge branch 'main' into pytest_plugin_cherrypick
eleanorjboyd Jan 18, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
LICENSE
MANIFEST.in
README.rst
pytest_vscode_integration.py
setup.py
pytest_vscode_integration.egg-info/PKG-INFO
pytest_vscode_integration.egg-info/SOURCES.txt
pytest_vscode_integration.egg-info/dependency_links.txt
pytest_vscode_integration.egg-info/entry_points.txt
pytest_vscode_integration.egg-info/requires.txt
pytest_vscode_integration.egg-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[pytest11]
vscode-integration = pytest_vscode_integration
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest>=3.5.0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest_vscode_integration
51 changes: 51 additions & 0 deletions pythonFiles/pytest-vscode-integration/setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#!/usr/bin/env python
# -*- coding: utf-8 -*-

import codecs
import os

from setuptools import setup


def read(fname):
file_path = os.path.join(os.path.dirname(__file__), fname)
return codecs.open(file_path, encoding="utf-8").read()


setup(
name="pytest-vscode-integration",
version="0.1.0",
author="Eleanor Boyd",
author_email="[email protected]",
maintainer="Eleanor Boyd",
maintainer_email="[email protected]",
license="MIT",
url="https://github.com/eleanorboyd/pytest-vscode-integration",
description="used to surface pytest functionality to ports for vscode integration",
long_description=read("README.rst"),
py_modules=["pytest_vscode_integration"],
python_requires=">=3.5",
install_requires=["pytest>=3.5.0"],
classifiers=[
"Development Status :: 4 - Beta",
"Framework :: Pytest",
"Intended Audience :: Developers",
"Topic :: Software Development :: Testing",
"Programming Language :: Python",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: 3.7",
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3 :: Only",
"Programming Language :: Python :: Implementation :: CPython",
"Programming Language :: Python :: Implementation :: PyPy",
"Operating System :: OS Independent",
"License :: OSI Approved :: MIT License",
],
entry_points={
"pytest11": [
"vscode-integration = pytest_vscode_integration",
],
},
)
1 change: 1 addition & 0 deletions pythonFiles/pytest-vscode-integration/tests/conftest.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pytest_plugins = "pytester"
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# -*- coding: utf-8 -*-


def test_bar_fixture(testdir):
"""Make sure that pytest accepts our fixture."""

# create a temporary pytest test module
testdir.makepyfile(
"""
def test_sth(bar):
assert bar == "europython2015"
"""
)

# run pytest with the following cmd args
result = testdir.runpytest("--foo=europython2015", "-v")

# fnmatch_lines does an assertion internally
result.stdout.fnmatch_lines(
[
"*::test_sth PASSED*",
]
)

# make sure that that we get a '0' exit code for the testsuite
assert result.ret == 0


def test_help_message(testdir):
result = testdir.runpytest(
"--help",
)
# fnmatch_lines does an assertion internally
result.stdout.fnmatch_lines(
[
"vscode-integration:",
'*--foo=DEST_FOO*Set the value for the fixture "bar".',
]
)


def test_hello_ini_setting(testdir):
testdir.makeini(
"""
[pytest]
HELLO = world
"""
)

testdir.makepyfile(
"""
import pytest

@pytest.fixture
def hello(request):
return request.config.getini('HELLO')

def test_hello_world(hello):
assert hello == 'world'
"""
)

result = testdir.runpytest("-v")

# fnmatch_lines does an assertion internally
result.stdout.fnmatch_lines(
[
"*::test_hello_world PASSED*",
]
)

# make sure that that we get a '0' exit code for the testsuite
assert result.ret == 0