Skip to content

After installing I get the following error running the test... #37

Closed
@mattshepherd

Description

@mattshepherd
> python-shell@0.4.0 test /usr/local/lib/node_modules/python-shell
> mocha -R spec



  PythonShell
    #ctor(script, options)
      ✓ should spawn a Python process (75ms)
      ✓ should spawn a Python process with options (55ms)
      ✓ should spawn a Python process with script arguments (53ms)
    #run(script, options)
      1) should run the script and return output data
      ✓ should try to run the script and fail appropriately (47ms)
      ✓ should run the script and fail with an extended stack trace (57ms)
      ✓ should run multiple scripts and fail with an extended stack trace for each of them (446ms)
      2) should run multiple scripts and return output data for each of them
    .send(message)
      ✓ should send string messages when mode is "text" (61ms)
      ✓ should send JSON messages when mode is "json" (63ms)
      ✓ should use a custom formatter (60ms)
      ✓ should write as-is when mode is "binary" (51ms)
    .receive(data)
      ✓ should emit messages as strings when mode is "text" (60ms)
      ✓ should emit messages as JSON when mode is "json" (62ms)
      ✓ should properly buffer partial messages (59ms)
      ✓ should not be invoked when mode is "binary" (54ms)
      ✓ should use a custom parser function (61ms)
    .end(callback)
      ✓ should end normally when exit code is zero (57ms)
      ✓ should emit error if exit code is not zero (57ms)
      ✓ should emit error when data is written to stderr (53ms)
    .parseError(data)
      ✓ should extend error with context properties (51ms)
      ✓ should extend err.stack with traceback (54ms)


  20 passing (2s)
  2 failing

  1) PythonShell #run(script, options) should run the script and return output data:
     Uncaught TypeError: Cannot read property 'have' of undefined
      at test/test-python-shell.js:43:47
      at null._endCallback (index.js:166:16)
      at terminateIfNeeded (index.js:116:35)
      at ChildProcess.<anonymous> (index.js:88:9)
      at Process.ChildProcess._handle.onexit (internal/child_process.js:200:12)

  2) PythonShell #run(script, options) should run multiple scripts and return output data for each of them:
     Uncaught TypeError: Cannot read property 'have' of undefined
      at test/test-python-shell.js:102:51
      at null._endCallback (index.js:166:16)
      at terminateIfNeeded (index.js:116:35)
      at Socket.<anonymous> (index.js:78:9)
      at endReadableNT (_stream_readable.js:903:12)

Any idea how to resolve?

Metadata

Metadata

Assignees

Labels

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions