mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-04 19:32:11 +01:00
Run doctests and unittests as part of automated testing
* Switch default version to Python 3.7. * Add 3.7 to the supported versions list. * Remove redundant test.py. This test module was basic and is being replaced by doctests and unittests.
This commit is contained in:
@@ -3,10 +3,11 @@ python:
|
||||
- '2.7'
|
||||
- '3.5'
|
||||
- '3.6'
|
||||
- '3.7'
|
||||
install:
|
||||
- pip install -U setuptools pip -r build-requirements.txt
|
||||
script:
|
||||
- python ./test.py
|
||||
- pytest --doctest-modules --cov=anybadge anybadge.py tests
|
||||
deploy:
|
||||
- provider: pypi
|
||||
user: jongracecox
|
||||
@@ -16,7 +17,7 @@ deploy:
|
||||
on:
|
||||
tags: true
|
||||
all_branches: true
|
||||
python: '3.6'
|
||||
python: '3.7'
|
||||
- provider: pypi
|
||||
user: jongracecox
|
||||
password:
|
||||
@@ -24,4 +25,4 @@ deploy:
|
||||
distributions: sdist bdist_wheel
|
||||
on:
|
||||
branch: master
|
||||
python: '3.6'
|
||||
python: '3.7'
|
||||
|
||||
15
test.py
15
test.py
@@ -1,15 +0,0 @@
|
||||
#!/usr/bin/python
|
||||
"""
|
||||
anybadge test module.
|
||||
"""
|
||||
|
||||
import anybadge
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
||||
thresholds={2: 'red', 4: 'orange', 6: 'green', 8: 'brightgreen'}
|
||||
|
||||
badge = anybadge.Badge('test', '2.22', value_suffix='%',
|
||||
thresholds=thresholds, text_color='#010101,#101010')
|
||||
|
||||
print(badge.badge_svg_text)
|
||||
Reference in New Issue
Block a user