diff options
author | James Socol <me@jamessocol.com> | 2022-11-05 17:25:36 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 17:25:36 -0400 |
commit | a89b5687f602efb9b836979c458b0aee6bb00acb (patch) | |
tree | a4c82354477a40b2d49f96fdc80a6d500c5579e7 | |
parent | 0bd1a158849f7307f1ee3be0e9c0addecf74520b (diff) | |
parent | b00f0db002fc85e3702da9427ac13ba0df2f124a (diff) | |
download | pystatsd-a89b5687f602efb9b836979c458b0aee6bb00acb.tar.gz |
Merge pull request #165 from jsocol/fix/python3.10plus
Replace nose with nose2
-rw-r--r-- | docs/contributing.rst | 6 | ||||
-rw-r--r-- | requirements.txt | 6 | ||||
-rw-r--r-- | setup.py | 1 | ||||
-rw-r--r-- | statsd/tests.py | 9 | ||||
-rw-r--r-- | tox.ini | 5 |
5 files changed, 13 insertions, 14 deletions
diff --git a/docs/contributing.rst b/docs/contributing.rst index 63639a5..c16769b 100644 --- a/docs/contributing.rst +++ b/docs/contributing.rst @@ -25,12 +25,12 @@ necessary. Running Tests ============= -To run the tests, you just need ``nose`` and ``mock``. These can be -installed with ``pip``:: +To run the tests, you just need ``nose2``. This can be installed with +``pip``:: $ mkvirtualenv statsd $ pip install -r requirements.txt - $ nosetests + $ nose2 You can also run the tests with tox:: diff --git a/requirements.txt b/requirements.txt index 6aa9af6..f81678b 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,3 @@ -mock==1.0.1 -nose==1.2.1 -flake8==1.7.0 +nose2 +flake8 +coverage @@ -13,7 +13,6 @@ setup( packages=find_packages(), include_package_data=True, package_data={'': ['README.rst']}, - test_suite='nose.collector', classifiers=[ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', diff --git a/statsd/tests.py b/statsd/tests.py index 12fc410..49fc2f0 100644 --- a/statsd/tests.py +++ b/statsd/tests.py @@ -4,10 +4,7 @@ import random import re import socket from datetime import timedelta -from unittest import SkipTest - -import mock -from nose.tools import eq_ +from unittest import SkipTest, mock from statsd import StatsClient from statsd import TCPStatsClient @@ -34,6 +31,10 @@ make_val = { } +def eq_(a, b, msg=None): + assert a == b, msg + + def _udp_client(prefix=None, addr=None, port=None, ipv6=False): if not addr: addr = ADDR[0] @@ -3,9 +3,8 @@ envlist = py37,py38,py39,py310,py311,pypy3 [testenv] deps= - mock - nose + nose2 coverage commands= - nosetests statsd --with-coverage --cover-package=statsd [] + nose2 statsd --with-coverage |