diff --git a/appveyor.yml b/appveyor.yml new file mode 100644 index 000000000000..d98a30c18fb6 --- /dev/null +++ b/appveyor.yml @@ -0,0 +1,29 @@ +environment: + matrix: + - PYTHON: "C:\\Python36" + PYTHON_VERSION: "3.6.3" + PYTHON_ARCH: "32" + nodejs_version: "8.9.1" + TRAVIS: "true" + +init: + - "ECHO %PYTHON% %PYTHON_VERSION% %PYTHON_ARCH%" + +install: + - ps: Install-Product node $env:nodejs_version + - npm i -g yarn + - yarn + - "SET PATH=%PYTHON%;%PYTHON%\\Scripts;%PATH%" + - pip install -U pip + - python --version + - python -m easy_install -U setuptools + - "%PYTHON%/Scripts/pip.exe install --upgrade -r requirements.txt" + +test_script: + - yarn run clean + - yarn run vscode:prepublish + - yarn run testDebugger --silent + - yarn run testSingleWorkspace --silent + - yarn run testMultiWorkspace --silent + +build: off diff --git a/python-0.7.0.vsix b/python-0.7.0.vsix new file mode 100644 index 000000000000..c4183036213f Binary files /dev/null and b/python-0.7.0.vsix differ diff --git a/src/test/aaFirstTest/aaFirstTest.test.ts b/src/test/aaFirstTest/aaFirstTest.test.ts new file mode 100644 index 000000000000..e6624cfadac8 --- /dev/null +++ b/src/test/aaFirstTest/aaFirstTest.test.ts @@ -0,0 +1,21 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +import { activated } from '../../client/extension'; +import { initialize } from '../initialize'; + +// NOTE: +// We need this to be run first, as this ensures the extension activates. +// Sometimes it can take more than 25 seconds to complete (as the extension looks for interpeters, and the like). +// So lets wait for a max of 1 minute for the extension to activate (note, subsequent load times are faster). + +suite('Activate Extension', () => { + suiteSetup(async function () { + // tslint:disable-next-line:no-invalid-this + this.timeout(60000); + await initialize(); + }); + test('Python extension has activated', async () => { + await activated; + }); +}); diff --git a/src/test/common/variables/envVarsService.test.ts b/src/test/common/variables/envVarsService.test.ts index 71bd1f7e3232..ab943e660b80 100644 --- a/src/test/common/variables/envVarsService.test.ts +++ b/src/test/common/variables/envVarsService.test.ts @@ -62,7 +62,7 @@ suite('Environment Variables Service', () => { const expectedPythonPath = '/usr/one/three:/usr/one/four'; const expectedPath = '/usr/x:/usr/y'; expect(vars).to.not.equal(undefined, 'Variables is is undefiend'); - expect(Object.keys(vars!)).lengthOf(4, 'Incorrect number of variables'); + expect(Object.keys(vars!)).lengthOf(5, 'Incorrect number of variables'); expect(vars).to.have.property('X', '1', 'X value is invalid'); expect(vars).to.have.property('Y', '2', 'Y value is invalid'); expect(vars).to.have.property('PYTHONPATH', expectedPythonPath, 'PYTHONPATH value is invalid'); diff --git a/src/test/debugger/misc.test.ts b/src/test/debugger/misc.test.ts index 7bf613bb2f6a..3541c9a8430c 100644 --- a/src/test/debugger/misc.test.ts +++ b/src/test/debugger/misc.test.ts @@ -243,7 +243,7 @@ const EXPERIMENTAL_DEBUG_ADAPTER = path.join(__dirname, '..', '..', 'client', 'd expect(varb).to.be.not.equal('undefined', 'variable \'b\' is undefined'); expect(varb.value).to.be.equal('2'); expect(varfile).to.be.not.equal('undefined', 'variable \'__file__\' is undefined'); - expect(varfile.value).to.be.equal(`'${path.join(debugFilesPath, 'sample2.py')}'`); + expect(path.normalize(varfile.value)).to.be.equal(`'${path.normalize(path.join(debugFilesPath, 'sample2.py'))}'`); expect(vardoc).to.be.not.equal('undefined', 'variable \'__doc__\' is undefined'); }); test('Test editing variables', async () => { diff --git a/src/testMultiRootWkspc/workspace4/.env5 b/src/testMultiRootWkspc/workspace4/.env5 index 0bdd935a9942..5a5fd7c1816c 100644 --- a/src/testMultiRootWkspc/workspace4/.env5 +++ b/src/testMultiRootWkspc/workspace4/.env5 @@ -1,4 +1,7 @@ X=1 Y=2 PYTHONPATH=/usr/one/three:/usr/one/four +# Unix PATH variable PATH=/usr/x:/usr/y +# Windows Path variable +Path=/usr/x:/usr/y