Skip to content

Commit

Permalink
Easy testing with nose, no packages explicit list
Browse files Browse the repository at this point in the history
  • Loading branch information
lmazuel committed Jul 8, 2016
1 parent 329ed43 commit db9b5bc
Show file tree
Hide file tree
Showing 15 changed files with 25 additions and 247 deletions.
7 changes: 7 additions & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
[run]
include =
azure*
omit =
*/test*
env*

[report]
exclude_lines =
pragma: no cover
Expand Down
14 changes: 2 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,9 @@ install:
- pip install -r requirements.txt
- pip install azure-storage
- pip install coveralls
- pip install nose
- pip uninstall -y azure-common
script:
- cd azure-servicebus/tests
- bash run-servicebus
- cd ../..
- cd azure-servicemanagement-legacy/tests
- bash run-legacy-mgmt
- cd ../..
- cd azure-mgmt/tests
- bash run-mgmt
- cd ../..
- rm -f .coverage
- coverage combine azure-mgmt/tests/.coverage azure-servicebus/tests/.coverage azure-servicemanagement-legacy/tests/.coverage
- coverage report
- python ./azure_nosetests.py
after_success:
coveralls
12 changes: 3 additions & 9 deletions appveyor.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,10 @@ install:
- "%PYTHON%\\python.exe -m pip install -U pip"
- "%PYTHON%\\python.exe -m pip install -r requirements.txt"
- "%PYTHON%\\python.exe -m pip install azure-storage"
- "%PYTHON%\\python.exe -m pip install nose"
- "%PYTHON%\\python.exe -m pip install coveralls"
- "%PYTHON%\\python.exe -m pip uninstall -y azure-common"

build: off

test_script:
- cd azure-servicebus/tests
- run-servicebus.bat %PYTHON%
- cd ../..
- cd azure-servicemanagement-legacy/tests
- run-legacy-mgmt.bat %PYTHON%
- cd ../..
- cd azure-mgmt/tests
- run-mgmt.bat %PYTHON%
test_script: "%PYTHON%\\python.exe ./azure_nosetests.py"
20 changes: 0 additions & 20 deletions azure-mgmt/tests/.coveragerc

This file was deleted.

29 changes: 0 additions & 29 deletions azure-mgmt/tests/run-mgmt

This file was deleted.

57 changes: 0 additions & 57 deletions azure-mgmt/tests/run-mgmt.bat

This file was deleted.

4 changes: 2 additions & 2 deletions azure-mgmt/tests/test_batch.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
LOG.level = logging.WARNING
LOG.addHandler(logging.StreamHandler())

def init_test_mode(working_folder):
def init_tst_mode(working_folder):
try:
path = os.path.join(working_folder, 'testsettings_local.json')
with open(path) as testsettings_local_file:
Expand Down Expand Up @@ -121,7 +121,7 @@ def setUpClass(cls):
LOG.debug("Setting up Batch tests:")
cls.working_folder = os.path.dirname(__file__)
try:
cls.test_mode = init_test_mode(cls.working_folder)
cls.test_mode = init_tst_mode(cls.working_folder)
cls.fake_settings = fake_settings
if TestMode.is_playback(cls.test_mode):
LOG.debug(" running in playback mode")
Expand Down
4 changes: 0 additions & 4 deletions azure-servicebus/tests/.coveragerc

This file was deleted.

14 changes: 0 additions & 14 deletions azure-servicebus/tests/run-servicebus

This file was deleted.

41 changes: 0 additions & 41 deletions azure-servicebus/tests/run-servicebus.bat

This file was deleted.

4 changes: 0 additions & 4 deletions azure-servicemanagement-legacy/tests/.coveragerc

This file was deleted.

14 changes: 0 additions & 14 deletions azure-servicemanagement-legacy/tests/run-legacy-mgmt

This file was deleted.

41 changes: 0 additions & 41 deletions azure-servicemanagement-legacy/tests/run-legacy-mgmt.bat

This file was deleted.

7 changes: 7 additions & 0 deletions azure_nosetests.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/usr/bin/env python

import os.path, nose, glob, sys
packages = [os.path.dirname(p) for p in glob.glob('azure*/setup.py')]
sys.path += packages

nose.main()
4 changes: 4 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[nosetests]
tests=azure-mgmt,azure-servicemanagement-legacy,azure-servicebus
with-coverage=1
cover-erase=1

0 comments on commit db9b5bc

Please sign in to comment.