Skip to content

Commit 2c5584f

Browse files
committed
fixes test enviromnent
1 parent eef84f2 commit 2c5584f

File tree

6 files changed

+17
-13
lines changed

6 files changed

+17
-13
lines changed

.travis.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ language: python
22
sudo: false
33

44
python:
5-
- "2.6"
65
- "2.7"
76
- "3.3"
87
- "3.4"
@@ -12,7 +11,7 @@ python:
1211

1312
install:
1413
- pip install .
15-
- pip install tox coverage codecov
14+
- pip install tox codecov
1615
- "TOX_ENV=${TRAVIS_PYTHON_VERSION/[0-9].[0-9]/py${TRAVIS_PYTHON_VERSION/.}}"
1716

1817

CHANGELOG

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
1.5.1
2+
-----
3+
* drop suport python 2.6
4+
15
1.5
26
---
37
* add support for 'globbing' package version and enviromnent variables

pytest_echo.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
# -*- coding: utf-8 -*-
2+
from __future__ import print_function
23
import fnmatch
34
import os
45
from pprint import pformat
@@ -63,11 +64,11 @@ def get_module_attribute(path):
6364
:param path: full path to the attribute
6465
:return:
6566
66-
>>> print get_module_attribute('linecache.cache.__class__')
67-
<type 'dict'>
68-
>>> print get_module_attribute('os.path.curdir')
67+
>>> print(get_module_attribute('linecache.cache.__class__'))
68+
<... 'dict'>
69+
>>> print(get_module_attribute('os.path.curdir'))
6970
'.'
70-
>>> print get_module_attribute('wrong')
71+
>>> print(get_module_attribute('wrong'))
7172
('Unable to load %s', 'wrong')
7273
"""
7374
parts = path.split('.')

setup.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
#!/usr/bin/env python
2+
# -*- coding: utf-8 -*-
23

34
from setuptools import setup
45
from pytest_echo import __version__
@@ -34,5 +35,5 @@
3435
'Programming Language :: Python :: 3.3',
3536
'Programming Language :: Python :: 3.4',
3637
'Programming Language :: Python :: 3.5',
37-
'Programming Language :: Python :: 3.6',
38+
'Programming Language :: Python :: 3.6'
3839
])

test_echo.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,8 @@ def test_echo_version_no_setuptools(testdir, monkeypatch):
8282

8383
def test_echo_version_glob(testdir):
8484
result = testdir.runpytest('--echo-version=pytest*')
85-
result.stdout.fnmatch_lines([" pytest: %s" % pytest.__version__,
86-
" pytest-echo: %s" % pytest_echo.__version__,
87-
])
85+
result.stdout.fnmatch_lines([" pytest: %s" % pytest.__version__])
86+
result.stdout.fnmatch_lines([" pytest-echo: %s" % pytest_echo.__version__])
8887

8988

9089
def test_echo_all(testdir):

tox.ini

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ envlist=py27,py33,py34,py35,py36,pypy
33

44
[testenv]
55
deps =
6-
py{27,33}: django<2
6+
py{27,33},pypy: django<2
77
py{34,35,36}: django
88
py{33,34}: pytest<3
99
py{33,34}: py<1.5
@@ -12,14 +12,14 @@ deps =
1212
commands =
1313
; py.test --pyargs test_echo.py
1414
pip install -e .
15-
coverage run -m py.test
15+
coverage run -m py.test test_echo.py pytest_echo.py
1616
coverage report
1717
coverage html
1818

1919
[pytest]
2020
pep8ignore = E128 E302
2121
doc/conf.py ALL
22-
;python_files=test_echo.py
22+
python_files=test_echo.py
2323

2424
addopts =
2525
--tb=short

0 commit comments

Comments
 (0)