Skip to content

Commit 20dbdfa

Browse files
committed
add failing test for stack trace
1 parent 62a1d87 commit 20dbdfa

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

test/test-python-shell.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,14 @@ describe('PythonShell', function () {
150150
done();
151151
});
152152
});
153+
it('should run the script and fail with an extended stack trace even when mode is binary', function (done) {
154+
PythonShell.run('error.py', {mode: "binary"}, function (err, results) {
155+
err.should.be.an.Error;
156+
err.exitCode.should.be.exactly(1);
157+
err.stack.should.containEql('----- Python Traceback -----');
158+
done();
159+
});
160+
});
153161
it('should run multiple scripts and fail with an extended stack trace for each of them', function (done) {
154162
let numberOfTimesToRun = 5;
155163
for (let i = 0; i < numberOfTimesToRun; i++) {

0 commit comments

Comments
 (0)