diff --git a/config.js b/config.js index db1ed10..37f34ea 100644 --- a/config.js +++ b/config.js @@ -29,6 +29,11 @@ exports = module.exports = { CPU_SHARE: "0.8", MEM_LIMIT: '200m' }, + 'py3': { + SOURCE_FILE: 'script.py', + CPU_SHARE: "0.8", + MEM_LIMIT: '200m' + }, 'nodejs6': { SOURCE_FILE: 'script.js', CPU_SHARE: "0.8", diff --git a/test/run.py3.spec.ts b/test/run.py3.spec.ts new file mode 100644 index 0000000..e6198ba --- /dev/null +++ b/test/run.py3.spec.ts @@ -0,0 +1,19 @@ +import {execRun} from '../src/tasks/run' +import {expect} from 'chai' + + +describe('run - py3', () => { + it('.py file runs correctly (Python 3.0)', () => { + execRun({ + id: 26, + lang: 'py3', + source: (new Buffer(` +inp = input() +print("Hello " + inp) + `)).toString('base64'), + stdin: (new Buffer('World')).toString('base64') + }, (runResult) => { + expect(new Buffer(runResult.stdout, 'base64').toString('ascii')).to.eq('Hello World\n') + }) + }) +}) \ No newline at end of file