Skip to content

Commit

Permalink
Remove explicit initialization of PYTHONPATH with workspace for dbg t…
Browse files Browse the repository at this point in the history
…est (#1576)

* Remove explicit initialization of PYTHONPATH with workspace for dbg test
* code review fixes
* fix code review comments
* Fixes #1465
  • Loading branch information
DonJayamanne authored May 7, 2018
1 parent 4bb0644 commit fffa444
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
1 change: 1 addition & 0 deletions news/3 Code Health/1465.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Remove explicit initialization of PYTHONPATH with the current workspace path in unit testing of modules with the experimental debugger.
10 changes: 3 additions & 7 deletions src/test/debugger/module.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,11 +35,7 @@ suite(`Module Debugging - Misc tests: ${debuggerType}`, () => {
} catch (ex) { }
await sleep(1000);
});
function buildLauncArgs(): LaunchRequestArguments {
const env = {};
// tslint:disable-next-line:no-string-literal
env['PYTHONPATH'] = `.${path.delimiter}${PTVSD_PATH}`;

function buildLaunchArgs(): LaunchRequestArguments {
// tslint:disable-next-line:no-unnecessary-local-variable
const options: LaunchRequestArguments = {
module: 'mymod',
Expand All @@ -48,7 +44,7 @@ suite(`Module Debugging - Misc tests: ${debuggerType}`, () => {
debugOptions: [DebugOptions.RedirectOutput],
pythonPath: PYTHON_PATH,
args: [],
env,
env: { PYTHONPATH: `${PTVSD_PATH}` },
envFile: '',
logToFile: false,
type: debuggerType
Expand All @@ -60,7 +56,7 @@ suite(`Module Debugging - Misc tests: ${debuggerType}`, () => {
test('Test stdout output', async () => {
await Promise.all([
debugClient.configurationSequence(),
debugClient.launch(buildLauncArgs()),
debugClient.launch(buildLaunchArgs()),
debugClient.waitForEvent('initialized'),
debugClient.assertOutput('stdout', 'Hello world!'),
debugClient.waitForEvent('exited'),
Expand Down

0 comments on commit fffa444

Please sign in to comment.