Configure nosetests through setup.cfg
authorHarmon <Harmon758@gmail.com>
Wed, 16 Oct 2019 14:59:33 +0000 (09:59 -0500)
committerHarmon <Harmon758@gmail.com>
Wed, 16 Oct 2019 15:12:22 +0000 (10:12 -0500)
Run Travis CI and tox tests through setuptools
Use NOSE_WITH_COVERAGE environment variable for Travis CI

.travis.yml
setup.cfg
tests/travis-tests.cfg [deleted file]
tox.ini

index 223195430bcdde7bf7c2f81f5609562b6fe6573d..6caf4737bf43281d7062e711d9934392ecf92aec 100644 (file)
@@ -16,6 +16,7 @@ env:
   global:
   - TWITTER_USERNAME="TweepyDev"
   - AWS_BUCKET="tweepy"
+  - NOSE_WITH_COVERAGE=1
   - USE_REPLAY=1
   - secure: TPQSFGqdl6khXqQqTZ6euROoAmFRnONAlPXD6npvTIIN+fNfnz8lvZtOEWHo2jRPLoU3FyVUhYvTynj6B2hJinulP+RKOMbQ65HCZVHrsitwl1n1QZB5HegQDOYc5q6VTTYn/r8r5tGy35U0O80y1zycTLqSJiXlkdqsSq564pI=
 
@@ -23,7 +24,7 @@ install:
   - pip install .[dev,test]
 
 script:
-  - nosetests -v --with-coverage -c tests/travis-tests.cfg
+  - python setup.py nosetests
 
 after_success:
   - if [[ "$TRAVIS_PULL_REQUEST" == "false" ]]; then coveralls; fi
index 2a9acf13daa95e85642ea255d3e3bd1ef8252804..0a4a8a9158668a037bd58555a3b4c5ba38af6772 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,2 +1,6 @@
 [bdist_wheel]
 universal = 1
+
+[nosetests]
+verbosity = 2
+tests = tests.test_api,tests.test_cursors,tests.test_resultset,tests.test_utils
diff --git a/tests/travis-tests.cfg b/tests/travis-tests.cfg
deleted file mode 100644 (file)
index b23d7d3..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-[nosetests]
-tests=tests.test_api,tests.test_cursors,tests.test_resultset,tests.test_utils
diff --git a/tox.ini b/tox.ini
index b88c0d950d1867887a2baf15142cbb3b8682f774..d94e46aec148112ad8c55f3ab3d9948dbe73c3c4 100644 (file)
--- a/tox.ini
+++ b/tox.ini
@@ -7,7 +7,7 @@
 envlist = py27, py35, py36, py37
 
 [testenv]
-commands = nosetests -v tests.test_api tests.test_cursors tests.test_resultset tests.test_utils
+commands = python setup.py nosetests
 extras = test
 setenv =
     USE_REPLAY = 1