Skip to content

Commit 0af74b3

Browse files
Merge pull request #130 from sendgrid/issue-120-headers
Test support for Python 3.3, 3.4 and 3.5
2 parents 814763b + 8b27acc commit 0af74b3

5 files changed

Lines changed: 44 additions & 7 deletions

File tree

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ python:
55
- '2.6'
66
- '2.7'
77
- '3.2'
8+
- '3.3'
9+
- '3.4'
10+
- '3.5'
811
install:
912
- python setup.py install
1013
script:

MIT.LICENSE

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
Copyright (c) 2015 SendGrid
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
4+
documentation files (the "Software"), to deal in the Software without restriction, including without limitation
5+
the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software,
6+
and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
7+
8+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of
9+
the Software.
10+
11+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
12+
THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
13+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
14+
CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
15+
DEALINGS IN THE SOFTWARE.

README.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -483,6 +483,9 @@ Tests
483483
pyenv install 2.6.9
484484
pyenv install 2.7.8
485485
pyenv install 3.2.6
486+
pyenv install 3.3.6
487+
pyenv install 3.4.3
488+
pyenv install 3.5.0
486489
487490
**Run the tests:**
488491

@@ -491,7 +494,7 @@ Tests
491494
virtualenv venv
492495
source venv/bin/activate #or . ./activate.sh
493496
python setup.py install
494-
pyenv local 3.2.6 2.7.8 2.6.9
497+
pyenv local 3.5.0 3.4.3 3.3.6 3.2.6 2.7.8 2.6.9
495498
pyenv rehash
496499
tox
497500
@@ -507,9 +510,6 @@ Deploying
507510
- Push changes to GitHub
508511
- Release tag on GitHub `vX.X.X`
509512

510-
MIT License
511-
-----------
512-
513513
.. _X-SMTPAPI: http://sendgrid.com/docs/API_Reference/SMTP_API/
514514
.. _SMTPAPI Python library: https://github.com/sendgrid/smtpapi-python
515515
.. _Substitution: http://sendgrid.com/docs/API_Reference/SMTP_API/substitution_tags.html

test/test_mail_v2.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ class TestSendGrid(unittest.TestCase):
2222

2323
def setUp(self):
2424
self.sg = SendGridClient(SG_USER, SG_PWD)
25+
self.maxDiff = None
2526

2627
def test_apikey_init(self):
2728
sg = SendGridClient(SG_PWD)
@@ -97,7 +98,10 @@ def test_send(self):
9798
}
9899
'''))
99100

100-
self.assertEqual(url, test_url)
101+
try:
102+
self.assertItemsEqual(url, test_url)
103+
except: # Python 3+
104+
self.assertCountEqual(url, test_url)
101105

102106
@unittest.skipUnless(sys.version_info < (3, 0), 'only for python2')
103107
def test__build_body_unicode(self):

tox.ini

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
# and then run "tox" from this directory.
55

66
[tox]
7-
envlist = py26, py27, py32
7+
envlist = py26, py27, py32, py33, py34, py35
88

99
[testenv]
1010
commands = {envbindir}/python -m unittest discover -v []
@@ -23,4 +23,19 @@ basepython = python2.7
2323
[testenv:py32]
2424
commands = {envbindir}/python -m unittest discover -v []
2525
deps =
26-
basepython = python3.2
26+
basepython = python3.2
27+
28+
[testenv:py33]
29+
commands = {envbindir}/python -m unittest discover -v []
30+
deps =
31+
basepython = python3.3
32+
33+
[testenv:py34]
34+
commands = {envbindir}/python -m unittest discover -v []
35+
deps =
36+
basepython = python3.4
37+
38+
[testenv:py35]
39+
commands = {envbindir}/python -m unittest discover -v []
40+
deps =
41+
basepython = python3.5

0 commit comments

Comments
 (0)