forked from DonJayamanne/pythonVSCode
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Closed
Labels
Milestone
Description
Refs: #17254
- anyOS @IanMatthewHuff
- anyOS @bpasero
- anyOS @roblourens
Complexity: 2
Authors: @karrtikr
Requirements
- Install python extension from here: https://pvsc.blob.core.windows.net/extension-builds/ms-python-insiders.vsix
Verification
- Ensure that you have
python.languageServerset toDefaultorPylance. - Open a python file from an untrusted location.
- You should be able to get hover, same file completion, completion for builtins like
print
Make sure you see this:

and a language status item:

with appropriate wording and links.
sample file:
import unittest
class TestStringMethods(unittest.TestCase):
def test_upper(self):
self.assertEqual('foo'.upper(), 'FOO')
def test_isupper(self):
self.assertTrue('FOO'.isupper())
self.assertFalse('Foo'.isupper())
def test_split(self):
s = 'hello world'
self.assertEqual(s.split(), ['hello', 'world'])
with self.assertRaises(TypeError):
s.split(2)
if __name__ == '__main__':
unittest.main()