Skip to content

pytest --doctest-modules neural_network fails #987

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
cclauss opened this issue Jul 9, 2019 · 0 comments
Closed

pytest --doctest-modules neural_network fails #987

cclauss opened this issue Jul 9, 2019 · 0 comments

Comments

@cclauss
Copy link
Member

cclauss commented Jul 9, 2019

Missing if __name__ == "__main__": ?

@cclauss cclauss changed the title python3 -m doctest -v neural_network fails python3 -m doctest -v neural_network/* fails Jul 11, 2019
@cclauss cclauss changed the title python3 -m doctest -v neural_network/* fails pytest --doctest-modules neural_network fails Jul 14, 2019
cclauss added a commit that referenced this issue Jul 14, 2019
Fixes #987
```
neural_network/perceptron.py:123: in <module>
    sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
    raise IOError("reading from stdin while output is captured")
E   OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------

value:
```
@cclauss cclauss closed this as completed Jul 18, 2019
cclauss added a commit that referenced this issue Jul 20, 2019
Fixes #987
```
neural_network/perceptron.py:123: in <module>
    sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
    raise IOError("reading from stdin while output is captured")
E   OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------

value:
```
cclauss added a commit that referenced this issue Aug 10, 2019
* Travis CI: Add pytest --doctest-modules neural_network

Fixes #987
```
neural_network/perceptron.py:123: in <module>
    sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
    raise IOError("reading from stdin while output is captured")
E   OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------

value:
```

* Adding fix from #1056 -- thanks @QuantumNovice

* if __name__ == '__main__':

* pytest --ignore=virtualenv  # do not test our dependencies
stokhos pushed a commit to stokhos/Python that referenced this issue Jan 3, 2021
…ms#1016)

* Travis CI: Add pytest --doctest-modules neural_network

Fixes TheAlgorithms#987
```
neural_network/perceptron.py:123: in <module>
    sample.insert(i, float(input('value: ')))
../lib/python3.7/site-packages/_pytest/capture.py:693: in read
    raise IOError("reading from stdin while output is captured")
E   OSError: reading from stdin while output is captured
-------------------------------------------------------------------------------- Captured stdout --------------------------------------------------------------------------------
('\nEpoch:\n', 399)
------------------------

value:
```

* Adding fix from TheAlgorithms#1056 -- thanks @QuantumNovice

* if __name__ == '__main__':

* pytest --ignore=virtualenv  # do not test our dependencies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant