Skip to content

Commit

Permalink
Merge pull request #127 from DataDog/yann/travis_wo_tox
Browse files Browse the repository at this point in the history
[test] do not use tox on Travis
  • Loading branch information
yannmh authored May 30, 2017
2 parents ac4c9e6 + 7e68df9 commit 3e8f8d5
Show file tree
Hide file tree
Showing 7 changed files with 27 additions and 50 deletions.
19 changes: 9 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
sudo: false
language: python
python:
- 3.5
env:
- TOX_ENV=py27
- TOX_ENV=pypy
- TOX_ENV=py33
- TOX_ENV=py34
- TOX_ENV=py35
- TOX_ENV=flake8
- "2.7"
- "pypy"
- "3.3"
- "3.4"
- "3.5"
- "3.6"
install:
- pip install tox
- pip install flake8
script:
- tox -e $TOX_ENV
- if [[ $TRAVIS_PYTHON_VERSION == '3.5' ]]; then flake8 --max-line-length=100 datadog; fi
- if [[ $TRAVIS_PYTHON_VERSION == '2.7' ]]; then python setup.py test; else python setup.py test -s tests.unit; fi
11 changes: 6 additions & 5 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
name="datadog",
version="0.16.0",
install_requires=install_reqs,
tests_require=["tox", "nose", "mock", "six", "pillow"],
tests_require=["nose", "mock"],
packages=[
'datadog',
'datadog.api',
Expand All @@ -31,22 +31,23 @@
author_email="[email protected]",
description="The Datadog Python library",
license="BSD",
keywords="datadog data",
url="http://www.datadoghq.com",
keywords="datadog",
url="https://www.datadoghq.com",
entry_points={
'console_scripts': [
'dog = datadog.dogshell:main',
'dogwrap = datadog.dogshell.wrap:main',
],
},
test_suite="nose.collector",
test_suite="tests",
classifiers=[
"License :: OSI Approved :: BSD License",
"Operating System :: OS Independent",
"Programming Language :: Python :: 2.7",
"Programming Language :: Python :: 3.3",
"Programming Language :: Python :: 3.4",
"Programming Language :: Python :: 3.5",
"Programming Language :: Python :: Implementation :: PyPy"
"Programming Language :: Python :: 3.6",
"Programming Language :: Python :: Implementation :: PyPy",
]
)
2 changes: 1 addition & 1 deletion tests/integration/api/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from datadog import initialize
from datadog import api as dog
from datadog.api.exceptions import ApiError
from tests.util.snapshot_test_utils import (
from tests.integration.util.snapshot_test_utils import (
assert_snap_not_blank, assert_snap_has_no_events
)

Expand Down
File renamed without changes.
8 changes: 6 additions & 2 deletions tests/performance/test_statsd_thread_safety.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# stdlib
from collections import deque
import six
import threading
import time
import unittest
Expand All @@ -10,6 +9,7 @@

# datadog
from datadog.dogstatsd.base import DogStatsd
from datadog.util.compat import is_p3k


class FakeSocket(object):
Expand All @@ -20,7 +20,11 @@ def __init__(self):
self.payloads = deque()

def send(self, payload):
assert type(payload) == six.binary_type
if is_p3k():
assert type(payload) == bytes
else:
assert type(payload) == str

self.payloads.append(payload)

def recv(self):
Expand Down
8 changes: 5 additions & 3 deletions tests/unit/dogstatsd/test_statsd.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
# stdlib
from collections import deque
import os
import six
import socket
import time

Expand All @@ -23,7 +22,7 @@
from datadog import initialize, statsd
from datadog.dogstatsd.base import DogStatsd
from datadog.dogstatsd.context import TimedContextManagerDecorator
from datadog.util.compat import is_higher_py35
from datadog.util.compat import is_higher_py35, is_p3k
from tests.util.contextmanagers import preserve_environment_variable
from tests.unit.dogstatsd.fixtures import load_fixtures

Expand All @@ -35,7 +34,10 @@ def __init__(self):
self.payloads = deque()

def send(self, payload):
assert type(payload) == six.binary_type
if is_p3k():
assert type(payload) == bytes
else:
assert type(payload) == str
self.payloads.append(payload)

def recv(self):
Expand Down
29 changes: 0 additions & 29 deletions tox.ini

This file was deleted.

0 comments on commit 3e8f8d5

Please sign in to comment.