Skip to content

Travis CI: Add pytest --doctest-modules machine_learning #1016

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

Merged
merged 6 commits into from
Aug 10, 2019

Conversation

cclauss
Copy link
Member

@cclauss cclauss commented Jul 14, 2019

Fixes #985 @dilson @AlexDvorak Your reviews please?

$ Travis CI: Add pytest --doctest-modules neural_network_

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 requested a review from AnupKumarPanwar July 14, 2019 08:06
@cclauss cclauss changed the title Travis CI: Add pytest --doctest-modules neural_network Travis CI: Add pytest --doctest-modules machine_learning Jul 16, 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
Copy link
Member Author

cclauss commented Jul 20, 2019

@QuantumNovice Please let me know if you can figure out how to fix this failing test:
https://travis-ci.org/TheAlgorithms/Python/builds/561390021#L579

@cclauss cclauss added awaiting reviews This PR is ready to be reviewed and removed help wanted labels Jul 21, 2019
@cclauss cclauss requested a review from ParthS007 July 21, 2019 09:26
@cclauss cclauss merged commit 36684db into master Aug 10, 2019
@cclauss cclauss deleted the cclauss-patch-3 branch August 10, 2019 20:48
stokhos pushed a commit to stokhos/Python that referenced this pull request 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
Labels
awaiting reviews This PR is ready to be reviewed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pytest --doctest-modules machine_learning fails
3 participants