Skip to content

Commit 5bc6c1c

Browse files
authored
Enable CI on AppVeyor (#872)
Fixes #402
1 parent 752709f commit 5bc6c1c

File tree

6 files changed

+55
-2
lines changed

6 files changed

+55
-2
lines changed

appveyor.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
environment:
2+
matrix:
3+
- PYTHON: "C:\\Python36"
4+
PYTHON_VERSION: "3.6.3"
5+
PYTHON_ARCH: "32"
6+
nodejs_version: "8.9.1"
7+
TRAVIS: "true"
8+
9+
init:
10+
- "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%"
11+
12+
install:
13+
- ps: Install-Product node $env:nodejs_version
14+
- npm i -g yarn
15+
- yarn
16+
- "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%"
17+
- pip install -U pip
18+
- python --version
19+
- python -m easy_install -U setuptools
20+
- "%PYTHON%/Scripts/pip.exe install --upgrade -r requirements.txt"
21+
22+
test_script:
23+
- yarn run clean
24+
- yarn run vscode:prepublish
25+
- yarn run testDebugger --silent
26+
- yarn run testSingleWorkspace --silent
27+
- yarn run testMultiWorkspace --silent
28+
29+
build: off

python-0.7.0.vsix

6.09 MB
Binary file not shown.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
// Copyright (c) Microsoft Corporation. All rights reserved.
2+
// Licensed under the MIT License.
3+
4+
import { activated } from '../../client/extension';
5+
import { initialize } from '../initialize';
6+
7+
// NOTE:
8+
// We need this to be run first, as this ensures the extension activates.
9+
// Sometimes it can take more than 25 seconds to complete (as the extension looks for interpeters, and the like).
10+
// So lets wait for a max of 1 minute for the extension to activate (note, subsequent load times are faster).
11+
12+
suite('Activate Extension', () => {
13+
suiteSetup(async function () {
14+
// tslint:disable-next-line:no-invalid-this
15+
this.timeout(60000);
16+
await initialize();
17+
});
18+
test('Python extension has activated', async () => {
19+
await activated;
20+
});
21+
});

src/test/common/variables/envVarsService.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ suite('Environment Variables Service', () => {
6262
const expectedPythonPath = '/usr/one/three:/usr/one/four';
6363
const expectedPath = '/usr/x:/usr/y';
6464
expect(vars).to.not.equal(undefined, 'Variables is is undefiend');
65-
expect(Object.keys(vars!)).lengthOf(4, 'Incorrect number of variables');
65+
expect(Object.keys(vars!)).lengthOf(5, 'Incorrect number of variables');
6666
expect(vars).to.have.property('X', '1', 'X value is invalid');
6767
expect(vars).to.have.property('Y', '2', 'Y value is invalid');
6868
expect(vars).to.have.property('PYTHONPATH', expectedPythonPath, 'PYTHONPATH value is invalid');

src/test/debugger/misc.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ const EXPERIMENTAL_DEBUG_ADAPTER = path.join(__dirname, '..', '..', 'client', 'd
243243
expect(varb).to.be.not.equal('undefined', 'variable \'b\' is undefined');
244244
expect(varb.value).to.be.equal('2');
245245
expect(varfile).to.be.not.equal('undefined', 'variable \'__file__\' is undefined');
246-
expect(varfile.value).to.be.equal(`'${path.join(debugFilesPath, 'sample2.py')}'`);
246+
expect(path.normalize(varfile.value)).to.be.equal(`'${path.normalize(path.join(debugFilesPath, 'sample2.py'))}'`);
247247
expect(vardoc).to.be.not.equal('undefined', 'variable \'__doc__\' is undefined');
248248
});
249249
test('Test editing variables', async () => {
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
X=1
22
Y=2
33
PYTHONPATH=/usr/one/three:/usr/one/four
4+
# Unix PATH variable
45
PATH=/usr/x:/usr/y
6+
# Windows Path variable
7+
Path=/usr/x:/usr/y

0 commit comments

Comments
 (0)