Skip to content

Commit 0fc6f98

Browse files
committedJul 22, 2017
updated my test system, and include unicode example
1 parent f10338d commit 0fc6f98

File tree

5 files changed

+20
-33
lines changed

5 files changed

+20
-33
lines changed
 

‎.coveragerc

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[report]
2+
exclude_lines =
3+
pragma: no cover
4+
def __repr__
5+
raise AssertionError
6+
raise NotImplementedError
7+
if __name__ == .__main__.:

‎setup.py

+1-22
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,9 @@
33

44
MAJOR_VERSION = '0'
55
MINOR_VERSION = '9'
6-
MICRO_VERSION = '178'
6+
MICRO_VERSION = '179'
77
VERSION = "{}.{}.{}".format(MAJOR_VERSION, MINOR_VERSION, MICRO_VERSION)
88

9-
from setuptools.command.test import test as TestCommand
10-
11-
12-
class PyTest(TestCommand):
13-
user_options = []
14-
15-
def initialize_options(self):
16-
pass
17-
18-
def finalize_options(self):
19-
pass
20-
21-
def run(self):
22-
import subprocess
23-
import sys
24-
errno = subprocess.call([sys.executable, 'tests/run_tests.py'])
25-
raise SystemExit(errno)
26-
27-
289
setup(name='yagmail',
2910
version=VERSION,
3011
description='Yet Another GMAIL client',
@@ -39,8 +20,6 @@ def run(self):
3920
entry_points={
4021
'console_scripts': ['yagmail = yagmail.__main__:main']
4122
},
42-
tests_require=['pytest'],
43-
cmdclass={'test': PyTest},
4423
classifiers=[
4524
'Environment :: Console',
4625
'Intended Audience :: Developers',

‎tests/run_tests.py ‎tests/all_test.py

+2-7
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
""" Testing module for yagmail """
22

33
import itertools
4-
import sys
5-
from os import path
6-
7-
8-
sys.path.append(path.dirname(path.dirname(path.abspath(__file__))))
9-
104
from yagmail import SMTP
115

126

@@ -15,7 +9,8 @@ def get_combinations(yag):
159
tos = (None, (yag.user), [yag.user, yag.user],
1610
{yag.user: 'me', yag.user + '1': 'me'})
1711
subjects = ('subj', ['subj'], ['subj', 'subj1'])
18-
contents = (None, ['body'], ['body', 'body1', '<h2><center>Text</center></h2>'])
12+
contents = (None, ['body'], ['body', 'body1',
13+
'<h2><center>Text</center></h2>', u"<h1>\u2013</h1>"])
1914
results = []
2015
for row in itertools.product(tos, subjects, contents):
2116
options = {y: z for y, z in zip(['to', 'subject', 'contents'], row)}

‎tox.ini

+9-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,15 @@
11
[tox]
2-
envlist = py27,py35,py36
2+
envlist = py27,py36
33

44
[testenv]
55
# If you add a new dep here you probably need to add it in setup.py as well
6+
passenv = TRAVIS TRAVIS_JOB_ID TRAVIS_BRANCH
7+
setenv =
8+
PYTHON_ENV = dev
69
deps =
710
pytest
8-
changedir = tests
9-
commands = py.test run_tests.py
11+
pytest-cov
12+
coveralls
13+
commands =
14+
py.test --cov ./yagmail
15+
coveralls

‎yagmail/__init__.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
__project__ = 'yagmail'
2-
__version__ = "0.9.178"
2+
__version__ = "0.9.179"
33

44
from yagmail.error import YagConnectionClosed
55
from yagmail.error import YagAddressError

0 commit comments

Comments
 (0)
Please sign in to comment.