Skip to content
This repository has been archived by the owner on Jan 26, 2022. It is now read-only.

Add new test for pagination variables #415

Merged
merged 4 commits into from
Apr 24, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
conda init bash
conda info -a
- name: Create the conda environment
run: conda create -n jupyterlab-debugger --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.6.12 ptvsd python=$PYTHON_VERSION
run: conda create -n jupyterlab-debugger --yes --quiet -c conda-forge nodejs jupyterlab=2 xeus-python=0.7.1 ptvsd python=$PYTHON_VERSION
env:
PYTHON_VERSION: '3.8'

Expand Down
43 changes: 0 additions & 43 deletions .github/workflows/wheel.yml

This file was deleted.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ A JupyterLab debugger UI extension. This extension is under active development.
## Prerequisites

- JupyterLab 2.0+
- xeus-python 0.6.7+
- xeus-python 0.7.1+
- notebook 6+

## Installation
Expand All @@ -21,7 +21,7 @@ A kernel with support for debugging is required to be able to use the debugger.
It is generally recommended to create a new `conda` environment to install the dependencies:

```bash
conda create -n jupyterlab-debugger -c conda-forge xeus-python=0.6.12 notebook=6 jupyterlab=2 ptvsd
conda create -n jupyterlab-debugger -c conda-forge xeus-python=0.7.1 notebook=6 jupyterlab=2 ptvsd
conda activate jupyterlab-debugger
```

Expand All @@ -35,7 +35,7 @@ jupyter labextension install @jupyterlab/debugger

```bash
# Create a new conda environment
conda create -n jupyterlab-debugger -c conda-forge nodejs xeus-python=0.6.12 ptvsd jupyterlab=2
conda create -n jupyterlab-debugger -c conda-forge nodejs xeus-python=0.7.1 ptvsd jupyterlab=2

# Activate the conda environment
conda activate jupyterlab-debugger
Expand Down
2 changes: 1 addition & 1 deletion binder/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ dependencies:
- nodejs
- notebook=6
- ptvsd
- xeus-python=0.6.12
- xeus-python=0.7.1
16 changes: 14 additions & 2 deletions tests/src/session.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ describe('protocol', () => {
});
});

const getVariables = async () => {
const getVariables = async (start?: number, count?: number) => {
const stackFramesReply = await debugSession.sendRequest('stackTrace', {
threadId
});
Expand All @@ -222,7 +222,9 @@ describe('protocol', () => {
const scopes = scopesReply.body.scopes;
const variablesReference = scopes[0].variablesReference;
const variablesReply = await debugSession.sendRequest('variables', {
variablesReference
variablesReference,
start,
count
});
return variablesReply.body.variables;
};
Expand All @@ -238,6 +240,16 @@ describe('protocol', () => {
});
});

describe('#variablesPagination', () => {
it('should return only one the variable (int) by pagination pointers start and count', async () => {
await debugSession.sendRequest('continue', { threadId });
const variables = await getVariables(1, 1);
const integers = variables.filter(variable => variable.type === 'int');
expect(integers).to.exist;
expect(integers.length).to.equals(1);
});
});

describe('#continue', () => {
it('should proceed to the next breakpoint', async () => {
let events: string[] = [];
Expand Down