Skip to content

Commit 139a2cc

Browse files
author
pgaref
committed
Working on #10 - Using Tox for testing Python 2.7 and 3 - Was able to regenerate ModuleNotFoundError
1 parent b9a0cfe commit 139a2cc

2 files changed

Lines changed: 44 additions & 2 deletions

File tree

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ def read(*parts):
1414
# intentionally *not* adding an encoding option to open
1515
return codecs.open(os.path.join(HERE, *parts), 'r').read()
1616

17-
LONG_DESCRIPTION = read('README.md')
17+
# LONG_DESCRIPTION = read('README.md')
1818

1919

2020
class PyTest(TestCommand):
@@ -40,7 +40,7 @@ def run_tests(self):
4040
author='Panagiotis Garefalakis',
4141
author_email='pangaref@gmail.com',
4242
description='A package using public proxies to randomise http requests.',
43-
long_description=LONG_DESCRIPTION,
43+
# long_description=LONG_DESCRIPTION,
4444
packages=find_packages(exclude=['tests']),
4545
cmdclass={'test': PyTest},
4646
test_suite='tests.test_parsers',

tox.ini

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Tox (http://tox.testrun.org/) is a tool for running tests
2+
# in multiple virtualenvs. This configuration file will run the
3+
# test suite on all supported python versions. To use it, "pip install tox"
4+
# and then run "tox" from this directory.
5+
6+
[tox]
7+
envlist = py27, py3
8+
9+
[testenv]
10+
;commands = {envpython} setup.py test
11+
deps =
12+
pytest
13+
coverage
14+
pytest-cov
15+
setenv=
16+
PYTHONWARNINGS=all
17+
18+
[pytest]
19+
adopts=--doctest-modules
20+
python_files=*.py
21+
python_functions=test_
22+
norecursedirs=.tox .git
23+
24+
[testenv:py27]
25+
basepython=python2.7
26+
commands=
27+
py.test tests --doctest-module
28+
29+
[testenv:py27verbose]
30+
basepython=python2.7
31+
commands=
32+
py.test tests --doctest-module --cov=. --cov-report term
33+
34+
[testenv:py3]
35+
basepython=python3
36+
commands=
37+
py.test tests --doctest-module
38+
39+
[testenv:py3verbose]
40+
basepython=python3
41+
commands=
42+
py.test --doctest-module --cov=. --cov-report term

0 commit comments

Comments
 (0)