mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Add a test that actually checks the vendored schema against upstream.
This commit is contained in:
parent
1f9b0f84dd
commit
65fff09ee5
2 changed files with 19 additions and 0 deletions
0
tests/system_tests/__init__.py
Normal file
0
tests/system_tests/__init__.py
Normal file
19
tests/system_tests/test_schema.py
Normal file
19
tests/system_tests/test_schema.py
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
import contextlib
|
||||
import io
|
||||
import unittest
|
||||
|
||||
from debugger_protocol.schema.__main__ import handle_check
|
||||
|
||||
|
||||
class VendoredSchemaTests(unittest.TestCase):
|
||||
|
||||
def test_matches_upstream(self):
|
||||
stdout = io.StringIO()
|
||||
with contextlib.redirect_stdout(stdout):
|
||||
with contextlib.redirect_stderr(stdout):
|
||||
try:
|
||||
handle_check()
|
||||
except Exception as exc:
|
||||
self.fail(str(exc))
|
||||
result = stdout.getvalue().strip().splitlines()[-1]
|
||||
self.assertEqual(result, 'schema file okay')
|
||||
Loading…
Add table
Add a link
Reference in a new issue