pip install .[dev,test]
- name: Run tests
run: |
- python setup.py nosetests
+ coverage run -m unittest discover tests
- name: Send coverage to Coveralls
continue-on-error: true
env:
``pip install .[test]``. Optionally install the ``dev`` extra as well, for
``tox`` and ``coverage``, e.g. ``pip install .[dev,test]``.
-3. Run ``python setup.py nosetests`` or simply ``nosetests`` in the source
- directory. With the ``dev`` extra, coverage will be shown, and ``tox`` can
- also be run to test different Python versions.
+3. Run tests (e.g. ``python -m unittest discover tests``) in the source
+ directory. With the ``dev`` extra, coverage can be measured by using
+ ``coverage run`` (e.g. ``coverage run -m unittest discover tests``) and
+ ``tox`` can be run to test different Python versions.
To record new cassettes, the following environment variables can be used:
[bdist_wheel]
universal = 1
-
-[nosetests]
-tests = tests.test_api,tests.test_client,tests.test_cursors,tests.test_resultset,tests.test_utils
-verbosity = 2
-with-coverage = 1
long_description = readme_file.read()
tests_require = [
- "nose>=1.3.3",
"vcrpy>=1.10.3",
]
"socks": ["requests[socks]>=2.11.1,<3"],
"test": tests_require,
},
- test_suite="nose.collector",
+ test_suite="tests",
keywords="twitter library",
python_requires=">=3.6",
classifiers=[
import unittest
from ast import literal_eval
-from .config import tape, TweepyTestCase, username
+from tests.config import tape, TweepyTestCase, username
from tweepy import API, FileCache, MemoryCache
from tweepy.models import Friendship
from tweepy.parsers import Parser
import random
import unittest
-from .config import *
+from tests.config import *
from tweepy import API, OAuthHandler
import unittest
-from .config import (
+from tests.config import (
access_token, access_token_secret, bearer_token, consumer_key,
consumer_secret, tape, user_id
)
-from .config import tape, TweepyTestCase, username
+from tests.config import tape, TweepyTestCase, username
from tweepy import Cursor
import os
import unittest
-from .config import create_auth
+from tests.config import create_auth
from tweepy import API
from tweepy.errors import HTTPException
-from .config import TweepyTestCase
+from tests.config import TweepyTestCase
from tweepy.models import ResultSet
envlist = py36, py37, py38, py39
[testenv]
-commands = python setup.py nosetests
+commands = python -m unittest discover tests
extras = test