Skip to content

Commit a5af1de

Browse files
fix functional tests
1 parent dca4f05 commit a5af1de

File tree

2 files changed

+8
-11
lines changed

2 files changed

+8
-11
lines changed

news/2 Fixes/5433.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Fix python 2.7 and 3.5 variable explorer nightly tests

src/test/datascience/variableexplorer.functional.test.tsx

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,9 @@ value = 'hello world'`;
166166

167167
// Test our display of basic types. We render 8 rows by default so only 8 values per test
168168
runMountedTest('Variable explorer - Types A', async (wrapper) => {
169-
const basicCode: string = `import numpy as np
170-
import pandas as pd
171-
myList = [x ** 2 for x in range(0,100000)]
169+
const basicCode: string = `myList = [1, 2, 3]
172170
mySet = set([42])
173-
myDict = {}
174-
for value in myList:
175-
myDict[value] = value / 2`;
171+
myDict = {'a': 1}`;
176172

177173
openVariableExplorer(wrapper);
178174

@@ -181,14 +177,14 @@ for value in myList:
181177

182178
// Verify that we actually update the variable explorer
183179
// Count here is our main render + a render for each variable row as they come in
184-
await waitForUpdate(wrapper, VariableExplorer, 6);
180+
await waitForUpdate(wrapper, VariableExplorer, 5);
185181

186182
const targetVariables: IJupyterVariable[] = [
187183
{name: 'a', value: '1', supportsDataExplorer: false, type: 'int', size: 54, shape: '', count: 0, truncated: false},
188-
{name: 'myDict', value: '{0: 0.0, 1: 0.5, 4: 2.0, 9: 4.5, 16: 8.0, 25: 12.5, 36: 18.0, 49: 24.5, 64: 32.0, 81: 40.5, 100: 50.0, 121: 60.5, 144: 72.0, 169: 84.5, 196: 98.0, 225: 112.5, 256: 128.0, 289: 144.5, 324: 162.0, 361: ', supportsDataExplorer: true, type: 'dict', size: 54, shape: '', count: 0, truncated: false},
189-
{name: 'myList', value: '[0, 1, 4, 9, 16, 25, 36, 49, 64, 81, 100, 121, 144, 169, 196, 225, 256, 289, 324, 361, 400, 441, 484, 529, 576, 625, 676, 729, 784, 841, 900, 961, 1024, 1089, 1156, 1225, 1296, 1369, 1444, 1521, 1600,', supportsDataExplorer: true, type: 'list', size: 54, shape: '', count: 0, truncated: false},
190-
{name: 'mySet', value: '{42}', supportsDataExplorer: true, type: 'set', size: 54, shape: '', count: 0, truncated: false},
191-
{name: 'value', value: '9999800001', supportsDataExplorer: false, type: 'int', size: 54, shape: '', count: 0, truncated: false},
184+
// tslint:disable-next-line:quotemark
185+
{name: 'myDict', value: "{'a': 1}", supportsDataExplorer: true, type: 'dict', size: 54, shape: '', count: 0, truncated: false},
186+
{name: 'myList', value: '[1, 2, 3]', supportsDataExplorer: true, type: 'list', size: 54, shape: '', count: 0, truncated: false},
187+
{name: 'mySet', value: '{42}', supportsDataExplorer: true, type: 'set', size: 54, shape: '', count: 0, truncated: false}
192188
];
193189
verifyVariables(wrapper, targetVariables);
194190
}, () => { return ioc; });

0 commit comments

Comments
 (0)