Skip to content

Commit 909e0cd

Browse files
committed
Merge branch 'release-1.0.1'
2 parents 233cedb + 4940f72 commit 909e0cd

19 files changed

+296
-301
lines changed

.coveragerc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
[run]
22
omit =
33
# Don't do coverage on test code
4-
stdio_mgr/test/*
5-
tests.py
4+
tests/*
5+
conftest.py
66

77
# Don't cover code in the env (Termux only?)
8-
env/*
8+
env*/*
99

1010
[report]
1111
exclude_lines =

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ __pycache__/
88

99
# Distribution / packaging
1010
.Python
11-
env/
11+
env*/
1212
build/
1313
develop-eggs/
1414
dist/
@@ -21,6 +21,7 @@ parts/
2121
sdist/
2222
var/
2323
wheels/
24+
pip-wheel-metadata/
2425
*.egg-info/
2526
.installed.cfg
2627
*.egg
@@ -45,6 +46,7 @@ nosetests.xml
4546
coverage.xml
4647
*.cover
4748
.hypothesis/
49+
.xcovrc
4850

4951
# Translations
5052
*.mo

.travis.yml

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,19 @@
11
install:
2-
- pip install -r requirements-travis.txt
2+
- pip install -U --force-reinstall -r requirements-travis.txt
3+
- is_py33=$( echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.3' | wc -l )
4+
- if [ $is_py33 -gt 0 ]; then pip install 'setuptools==39.0.0'; fi
5+
- pip install -e .
36
language: python
47
python:
58
- 3.3
69
- 3.4
710
- 3.5
811
- 3.6
12+
- 3.7-dev
913
script:
10-
- coverage run tests.py -a
11-
- flake8 stdio_mgr
12-
- echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.5' && codecov || echo "No codecov."
13-
14+
- python --version
15+
- pip list
16+
- pytest --cov=src/stdio_mgr
17+
- do_rest=$( echo $TRAVIS_PYTHON_VERSION | grep -e '^3\.6' | wc -l )
18+
- if [ $do_rest -gt 0 ]; then codecov; else echo "No codecov."; fi
19+
- if [ $do_rest -gt 0 ]; then pip install black; black --check .; else echo "No black."; fi

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,15 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
### [Unreleased]
99

10+
...
11+
12+
### [1.0.1] - 2019-02-11
13+
14+
#### Changed
15+
16+
* `TeeStdin` is now a `slots=False` attrs class, to avoid errors arising
17+
from some manner of change in the vicinity of attrs v18.1/v18.2.
18+
1019
### [1.0.0] - 2018-04-01
1120

1221
#### Features

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
MIT License
22

3-
Copyright (c) 2018 Brian Skinn
3+
Copyright (c) 2018-2019 Brian Skinn
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
include LICENSE.txt README.rst CHANGELOG.md
1+
include LICENSE.txt README.rst CHANGELOG.md pyproject.toml

README.rst

Lines changed: 22 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,31 @@
1-
stdio Manager
2-
=============
1+
stdio Manager: Context manager for mocking/wrapping ``stdin``/``stdout``/``stderr``
2+
===================================================================================
33

4-
*Python context manager for mocking/wrapping* ``stdin``/``stdout``/``stderr``
4+
**Current Development Version:**
55

66
.. image:: https://travis-ci.org/bskinn/stdio-mgr.svg?branch=dev
77
:target: https://travis-ci.org/bskinn/stdio-mgr
88

99
.. image:: https://codecov.io/gh/bskinn/stdio-mgr/branch/dev/graph/badge.svg
1010
:target: https://codecov.io/gh/bskinn/stdio-mgr
1111

12+
**Most Recent Stable Release:**
13+
1214
.. image:: https://img.shields.io/pypi/v/stdio_mgr.svg
1315
:target: https://pypi.org/project/stdio-mgr
1416

1517
.. image:: https://img.shields.io/pypi/pyversions/stdio-mgr.svg
1618

19+
**Info:**
20+
1721
.. image:: https://img.shields.io/github/license/mashape/apistatus.svg
1822
:target: https://github.com/bskinn/stdio-mgr/blob/master/LICENSE.txt
1923

24+
.. image:: https://img.shields.io/badge/code%20style-black-000000.svg
25+
:target: https://github.com/ambv/black
26+
27+
----
28+
2029
**Have a CLI Python application?**
2130

2231
**Want to automate testing of the actual console input & output
@@ -75,7 +84,7 @@ upon exiting the managed context.
7584
... warnings.warn("'foo' has no 'bar'")
7685
... err_cap = err_.getvalue()
7786
>>> err_cap
78-
"...README.rst:2: UserWarning: 'foo' has no 'bar'\n =============\n"
87+
"...UserWarning: 'foo' has no 'bar'\n..."
7988
8089
8190
**Mock** ``stdin``\ **:**
@@ -164,11 +173,17 @@ wrap functions that directly output to ``stdout``/``stderr``. A ``stdout`` examp
164173
| Lorem ipsum dolor sit amet. |
165174
===============================
166175
176+
----
167177

168-
**Feature requests or bug reports?**
178+
Available on `PyPI <https://pypi.python.org/pypi/stdio-mgr>`__
179+
(``pip install stdio-mgr``).
169180

170-
Please submit them as GitHub `Issues <https://github.com/bskinn/stdio-mgr/issues>`__.
181+
Source on `GitHub <https://github.com/bskinn/stdio-mgr>`__. Bug reports
182+
and feature requests are welcomed at the
183+
`Issues <https://github.com/bskinn/stdio-mgr/issues>`__ page there.
171184

172-
\(c) 2018 Brian Skinn
185+
Copyright \(c) 2018-2019 Brian Skinn
173186

187+
License: The MIT License. See `LICENSE.txt <https://github.com/bskinn/stdio-mgr/blob/master/LICENSE.txt>`__
188+
for full license terms.
174189

conftest.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
r"""*pytest configuration for the* ``stdio_mgr`` *test suite*.
2+
3+
``stdio_mgr`` provides a context manager for convenient
4+
mocking and/or wrapping of ``stdin``/``stdout``/``stderr``
5+
interactions.
6+
7+
**Author**
8+
Brian Skinn (bskinn@alum.mit.edu)
9+
10+
**File Created**
11+
6 Feb 2019
12+
13+
**Copyright**
14+
\(c) Brian Skinn 2018-2019
15+
16+
**Source Repository**
17+
http://www.github.com/bskinn/stdio-mgr
18+
19+
**Documentation**
20+
See README.rst at the GitHub repository
21+
22+
**License**
23+
The MIT License; see |license_txt|_ for full license terms
24+
25+
**Members**
26+
27+
"""
28+
29+
import pytest
30+
31+
from stdio_mgr import stdio_mgr
32+
33+
34+
@pytest.fixture(autouse=True)
35+
def add_stdio_mgr(doctest_namespace):
36+
doctest_namespace["stdio_mgr"] = stdio_mgr

pyproject.toml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
[build-system]
2+
requires = ["wheel", "setuptools", "attrs>=17.1"]
3+
build-backend = "setuptools.build_meta"
4+
5+
[tool.black]
6+
line-length = 79
7+
include = '''
8+
(
9+
^/tests/
10+
| ^/src/stdio_mgr/
11+
| ^/setup[.]py
12+
| ^/conftest[.]py
13+
)
14+
'''
15+
exclude = '''
16+
(
17+
__pycache__
18+
)
19+
'''

requirements-dev.txt

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
1-
attrs>=17,<18
2-
coverage
1+
attrs>=17
2+
black
33
flake8==3.4.1
44
flake8-docstrings==1.1.0
55
ipython
6+
pytest
7+
pytest-cov
68
restview
9+
tox
710
twine
811
wget
12+
-e .

0 commit comments

Comments
 (0)