Skip to content

The tests fail for the Worker Class: io.UnsupportedOperation: fileno #7

@devinbfergy

Description

@devinbfergy

The tests included with this repository fail execution via an io.UnsupportedOperation: fileno

Expected Behavior

The expected behavior is that one should be able to provide the input and output streams as StringIO objects and run the Code. The tests rely on the ability to load configuration files/ input files via stdin at runtime.

Current Behavior

The current behavior is the tests fail with the following same result:
image

Possible Solution

The solution could be to change the assumption that r, w, e = select.select([sys.stdin], [], [], self.READ_TIMEOUT) requires the file descriptor type which is provided by fileno.

Steps to Reproduce

  1. clone the repository
  2. cd cortexutils
  3. python -m unittest discover
  4. Profit?? ;)

Context (Environment)

The reason this is affecting me is that I am trying to build tests for responders/analyzers that are built on top of this project. This is stopping those tests from running in similar fashion to the tests included in this repository.

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions