Skip to content

Commit a796363

Browse files
committed
add test for #217
1 parent 3ad7229 commit a796363

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

test/python/echo_hi_then_error.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
print('hi')
2+
raise Exception('fibble-fah')

test/test-python-shell.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,13 @@ describe('PythonShell', function () {
142142
done();
143143
});
144144
});
145+
it('should include both output and error', function (done) {
146+
PythonShell.run('echo_hi_then_error.py', null, function (err, results) {
147+
err.should.be.an.Error;
148+
results.should.eql(['hi'])
149+
done();
150+
});
151+
});
145152
it('should run the script and fail with an extended stack trace', function (done) {
146153
PythonShell.run('error.py', null, function (err, results) {
147154
err.should.be.an.Error;

0 commit comments

Comments
 (0)