mirror of
https://github.com/microsoft/debugpy.git
synced 2025-12-23 08:48:12 +00:00
Merge pull request #1621 from microsoft/fix_numpy_tests
Fix test failures
This commit is contained in:
commit
6e8e5becb2
7 changed files with 20 additions and 18 deletions
|
|
@ -28,7 +28,7 @@ jobs:
|
||||||
pool: { vmImage: "ubuntu-latest" }
|
pool: { vmImage: "ubuntu-latest" }
|
||||||
|
|
||||||
variables:
|
variables:
|
||||||
python.version: "3.8"
|
python.version: "3.9"
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
|
||||||
|
|
@ -57,8 +57,6 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
py38:
|
|
||||||
python.version: "3.8"
|
|
||||||
py39:
|
py39:
|
||||||
python.version: "3.9"
|
python.version: "3.9"
|
||||||
py310:
|
py310:
|
||||||
|
|
@ -87,8 +85,6 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
py38:
|
|
||||||
python.version: "3.8"
|
|
||||||
py39:
|
py39:
|
||||||
python.version: "3.9"
|
python.version: "3.9"
|
||||||
py310:
|
py310:
|
||||||
|
|
@ -117,8 +113,6 @@ jobs:
|
||||||
|
|
||||||
strategy:
|
strategy:
|
||||||
matrix:
|
matrix:
|
||||||
py38:
|
|
||||||
python.version: "3.8"
|
|
||||||
py39:
|
py39:
|
||||||
python.version: "3.9"
|
python.version: "3.9"
|
||||||
py39_32:
|
py39_32:
|
||||||
|
|
|
||||||
|
|
@ -10,16 +10,19 @@ steps:
|
||||||
echo 'tox environment: $toxEnv'
|
echo 'tox environment: $toxEnv'
|
||||||
python -m tox -e $toxEnv -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
python -m tox -e $toxEnv -- --junitxml=$(Build.ArtifactStagingDirectory)/tests.xml --debugpy-log-dir=$(Build.ArtifactStagingDirectory)/logs tests
|
||||||
displayName: "Run tests using tox"
|
displayName: "Run tests using tox"
|
||||||
|
env:
|
||||||
|
DEBUGPY_PROCESS_SPAWN_TIMEOUT: 60
|
||||||
|
DEBUGPY_LAUNCH_TIMEOUT: 60
|
||||||
|
|
||||||
- task: "PublishBuildArtifacts@1"
|
- task: PublishBuildArtifacts@1
|
||||||
condition: "failed()"
|
condition: failed()
|
||||||
inputs:
|
inputs:
|
||||||
artifactName: "Test logs"
|
artifactName: "Test logs"
|
||||||
pathToPublish: "$(Build.ArtifactStagingDirectory)/logs"
|
pathToPublish: "$(Build.ArtifactStagingDirectory)/logs"
|
||||||
displayName: "Publish test logs"
|
displayName: "Publish test logs"
|
||||||
|
|
||||||
- task: "PublishTestResults@2"
|
- task: PublishTestResults@2
|
||||||
condition: "always()"
|
condition: always()
|
||||||
inputs:
|
inputs:
|
||||||
testRunTitle: "$(Agent.JobName)"
|
testRunTitle: "$(Agent.JobName)"
|
||||||
testResultsFiles: "tests.xml"
|
testResultsFiles: "tests.xml"
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import functools
|
||||||
from debugpy.common import json, log, messaging, util
|
from debugpy.common import json, log, messaging, util
|
||||||
|
|
||||||
|
|
||||||
ACCEPT_CONNECTIONS_TIMEOUT = 10
|
ACCEPT_CONNECTIONS_TIMEOUT = 60
|
||||||
|
|
||||||
|
|
||||||
class ComponentNotAvailable(Exception):
|
class ComponentNotAvailable(Exception):
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,9 @@ import re
|
||||||
import sys
|
import sys
|
||||||
from importlib.util import find_spec
|
from importlib.util import find_spec
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
from typing import Union
|
||||||
|
from typing import Tuple
|
||||||
|
from typing import Dict
|
||||||
|
|
||||||
# debugpy.__main__ should have preloaded pydevd properly before importing this module.
|
# debugpy.__main__ should have preloaded pydevd properly before importing this module.
|
||||||
# Otherwise, some stdlib modules above might have had imported threading before pydevd
|
# Otherwise, some stdlib modules above might have had imported threading before pydevd
|
||||||
|
|
@ -43,14 +46,14 @@ Usage: debugpy --listen | --connect
|
||||||
|
|
||||||
class Options(object):
|
class Options(object):
|
||||||
mode = None
|
mode = None
|
||||||
address: "tuple[str, int] | None" = None
|
address: Union[Tuple[str, int], None] = None
|
||||||
log_to = None
|
log_to = None
|
||||||
log_to_stderr = False
|
log_to_stderr = False
|
||||||
target: str | None = None
|
target: Union[str, None] = None
|
||||||
target_kind: str | None = None
|
target_kind: Union[str, None] = None
|
||||||
wait_for_client = False
|
wait_for_client = False
|
||||||
adapter_access_token = None
|
adapter_access_token = None
|
||||||
config: "dict[str, Any]" = {}
|
config: Dict[str, Any] = {}
|
||||||
|
|
||||||
|
|
||||||
options = Options()
|
options = Options()
|
||||||
|
|
|
||||||
|
|
@ -150,6 +150,7 @@ def test_vsc_exception_options_raise_without_except(
|
||||||
sys.platform == "darwin",
|
sys.platform == "darwin",
|
||||||
reason="https://github.com/microsoft/ptvsd/issues/1988",
|
reason="https://github.com/microsoft/ptvsd/issues/1988",
|
||||||
)
|
)
|
||||||
|
@pytest.mark.flaky(retries=2, delay=1)
|
||||||
@pytest.mark.parametrize("target", targets.all_named)
|
@pytest.mark.parametrize("target", targets.all_named)
|
||||||
@pytest.mark.parametrize("run", runners.all)
|
@pytest.mark.parametrize("run", runners.all)
|
||||||
@pytest.mark.parametrize("raised", ["raised", ""])
|
@pytest.mark.parametrize("raised", ["raised", ""])
|
||||||
|
|
|
||||||
|
|
@ -51,7 +51,7 @@ def test_ndarray(pyfile, target, run):
|
||||||
{
|
{
|
||||||
"type": "int32",
|
"type": "int32",
|
||||||
"name": "0",
|
"name": "0",
|
||||||
"value": "123",
|
"value": some.str.containing("123"),
|
||||||
"variablesReference": some.int,
|
"variablesReference": some.int,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
@ -59,7 +59,7 @@ def test_ndarray(pyfile, target, run):
|
||||||
{
|
{
|
||||||
"type": "int32",
|
"type": "int32",
|
||||||
"name": "1",
|
"name": "1",
|
||||||
"value": "456",
|
"value": some.str.containing("456"),
|
||||||
"variablesReference": some.int,
|
"variablesReference": some.int,
|
||||||
}
|
}
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ pytest
|
||||||
pytest-xdist
|
pytest-xdist
|
||||||
pytest-cov
|
pytest-cov
|
||||||
pytest-timeout
|
pytest-timeout
|
||||||
|
pytest-retry
|
||||||
|
|
||||||
## Used by test helpers:
|
## Used by test helpers:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue