Skip to content

Commit 22074ef

Browse files
committed
Merge branch 'release/1.2'
* release/1.2: bump 1.2 beautify output
2 parents 80a63b6 + e4c95c7 commit 22074ef

File tree

5 files changed

+30
-9
lines changed

5 files changed

+30
-9
lines changed

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.2
2+
---
3+
* changed output layout
4+
15
1.1
26
---
37
* removed dump of django settings and related options (--echo-settings)

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Dump package version
4646
4747
4848
Dump attributes
49-
~~~~~~~~~~~~~~~~~~~~
49+
~~~~~~~~~~~~~~~
5050

5151
.. code-block:: sh
5252

docs/conf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@
4848
# built documents.
4949
#
5050
# The short X.Y version.
51-
version = '0.1'
51+
version = '1.2'
5252
# The full version, including alpha/beta/rc tags.
53-
release = '0.1'
53+
release = '1.2'
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.

pytest_echo.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pprint import pformat
44

55

6-
__version__ = '1.1'
6+
__version__ = '1.2'
77

88

99
class RetrieveException(Exception):
@@ -103,15 +103,18 @@ def _get_version(package_name):
103103

104104
def pytest_report_header(config):
105105
ret = []
106-
if config.option.echo_attribues:
107-
ret.append("\n".join(["%s: %s" % (k, get_module_attribute(k))
108-
for k in config.option.echo_attribues]))
109106
if config.option.echo_envs:
110-
ret.append("\n".join(["%s: %s" % (k, os.environ.get(k, "<not set>"))
107+
ret.append("Environment:")
108+
ret.append("\n".join([" %s: %s" % (k, os.environ.get(k, "<not set>"))
111109
for k in config.option.echo_envs]))
112110
if config.option.echo_versions:
113-
ret.append("\n".join(["%s: %s" % (k, _get_version(k))
111+
ret.append("Package version:")
112+
ret.append("\n".join([" %s: %s" % (k, _get_version(k))
114113
for k in config.option.echo_versions]))
114+
if config.option.echo_attribues:
115+
ret.append("Inspections:")
116+
ret.append("\n".join([" %s: %s" % (k, get_module_attribute(k))
117+
for k in config.option.echo_attribues]))
115118
if ret:
116119
return "\n".join(ret)
117120

test_echo.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,3 +109,17 @@ def pytest_configure(config):
109109
result.stdout.fnmatch_lines([
110110
"django.conf.settings.DEBUG: False",
111111
])
112+
113+
def test_django_settings_extended(testdir):
114+
testdir.makeconftest("""
115+
def pytest_configure(config):
116+
import django
117+
from django.conf import settings # noqa
118+
settings.configure()
119+
settings.DATABASES = {'default':{ 'ENGINE': 'sqlite3'}}
120+
""")
121+
result = testdir.runpytest('--echo-attr=django.conf.settings.DATABASES.default.ENGINE')
122+
result.stdout.fnmatch_lines([
123+
"django.conf.settings.DATABASES.default.ENGINE: 'sqlite3'"
124+
])
125+

0 commit comments

Comments
 (0)