Open kloczek opened 5 months ago
Thanks for the report. This is actually because you're using node.js v12 which is unfortunately not supported in the most recent versions of pyright. If you upgrade to a newer node version these tests should pass.
Nope, I'm using nodejs 20.12.1.
I'm packaging your module as an rpm package so I'm using the typical PEP517 based build, install and test cycle used on building packages from non-root account.
python3 -sBm build -w --no-isolation
build
with--no-isolation
I'm using during all processes only locally installed modulesinstaller
modulecut off from access to the public network
(pytest is executed with-m "not network"
)Here is pytest output:
```console + PYTHONPATH=/home/tkloczko/rpmbuild/BUILDROOT/python-pyright-1.1.357-2.fc37.x86_64/usr/lib64/python3.10/site-packages:/home/tkloczko/rpmbuild/BUILDROOT/python-pyright-1.1.357-2.fc37.x86_64/usr/lib/python3.10/site-packages + /usr/bin/pytest -ra -m 'not network' ============================= test session starts ============================== platform linux -- Python 3.10.14, pytest-8.1.1, pluggy-1.4.0 rootdir: /home/tkloczko/rpmbuild/BUILD/pyright-python-1.1.357 configfile: pyproject.toml plugins: subprocess-1.5.0 collected 28 items tests/test_langserver.py .. [ 7%] tests/test_main.py .............F.. [ 64%] tests/test_node.py ......... [ 96%] tests/test_types.py . [100%] =================================== FAILURES =================================== _________________________________ test_nodeenv _________________________________ def test_nodeenv() -> None: """Ensure nodeenv is successfully downloaded and used""" > subprocess.run( [sys.executable, '-m', 'pyright', '--version'], check=True, stdout=subprocess.PIPE, env=dict( os.environ, PYRIGHT_PYTHON_GLOBAL_NODE='0', ), ) tests/test_main.py:194: _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ input = None, capture_output = False, timeout = None, check = True popenargs = (['/usr/bin/python3', '-m', 'pyright', '--version'],) kwargs = {'env': {'AR': '/usr/bin/gcc-ar', 'ASMFLAGS': '-m64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protecti...-Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -Wall -Werror=format-security', ...}, 'stdout': -1} process =Please let me know if you need more details or want me to perform some diagnostics.