mirror of
https://github.com/jongracecox/anybadge.git
synced 2026-01-04 11:21:58 +01:00
Add package testing to CI (#68)
* Make `build_examples.py` callable from python * Allow tests to run from outside project directory * Add invoke tasks * Add server tests * Run travis tests against wheel package instead of local code * Update `badge.write_badge()` to support `pathlib.Path` * Update `CONTRIBUTING.md`
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
import anybadge
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
def main():
|
||||
print(
|
||||
"""
|
||||
| Color Name | Hex | Example |
|
||||
| ------------- | ------- | ------- |"""
|
||||
)
|
||||
for color in sorted(anybadge.colors.Color):
|
||||
|
||||
file = "examples/color_" + color.name.lower() + ".svg"
|
||||
|
||||
url = "https://cdn.rawgit.com/jongracecox/anybadge/master/" + file
|
||||
@@ -20,3 +19,7 @@ if __name__ == "__main__":
|
||||
print(
|
||||
f"| {color.name.lower():<13} | {color.value.upper():<7} | ':<84}|"
|
||||
)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
||||
Reference in New Issue
Block a user