Update coverage instructions and badge
This commit is contained in:
parent
73cbb10aae
commit
7ee10c2c92
4 changed files with 15 additions and 9 deletions
|
|
@ -11,12 +11,18 @@ Adjust the file to contain appropriate information for your YouTube account and
|
||||||
|
|
||||||
Coverage badge
|
Coverage badge
|
||||||
--------------
|
--------------
|
||||||
Install ``coverage`` and ``coverage-badge`` with pip. Run
|
Make sure you installed the dev requirements as explained in `CONTRIBUTING.rst <https://github.com/sigma67/ytmusicapi/blob/master/CONTRIBUTING.rst>`_. Run
|
||||||
|
|
||||||
``coverage run --source=ytmusicapi -m unittest discover tests``
|
.. code-block:: bash
|
||||||
|
|
||||||
to generate a coverage report in the project root. With
|
cd tests
|
||||||
|
coverage run --source=../ytmusicapi -m unittest test.py
|
||||||
|
|
||||||
``coverage-badge -o tests/coverage.svg -f``
|
|
||||||
|
to generate a coverage report. With
|
||||||
|
|
||||||
|
.. code-block:: bash
|
||||||
|
|
||||||
|
coverage-badge -o coverage.svg -f
|
||||||
|
|
||||||
you generate the badge.
|
you generate the badge.
|
||||||
|
|
@ -9,13 +9,13 @@
|
||||||
</mask>
|
</mask>
|
||||||
<g mask="url(#a)">
|
<g mask="url(#a)">
|
||||||
<path fill="#555" d="M0 0h63v20H0z"/>
|
<path fill="#555" d="M0 0h63v20H0z"/>
|
||||||
<path fill="#4c1" d="M63 0h36v20H63z"/>
|
<path fill="#97CA00" d="M63 0h36v20H63z"/>
|
||||||
<path fill="url(#b)" d="M0 0h99v20H0z"/>
|
<path fill="url(#b)" d="M0 0h99v20H0z"/>
|
||||||
</g>
|
</g>
|
||||||
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
<g fill="#fff" text-anchor="middle" font-family="DejaVu Sans,Verdana,Geneva,sans-serif" font-size="11">
|
||||||
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
|
<text x="31.5" y="15" fill="#010101" fill-opacity=".3">coverage</text>
|
||||||
<text x="31.5" y="14">coverage</text>
|
<text x="31.5" y="14">coverage</text>
|
||||||
<text x="80" y="15" fill="#010101" fill-opacity=".3">95%</text>
|
<text x="80" y="15" fill="#010101" fill-opacity=".3">93%</text>
|
||||||
<text x="80" y="14">95%</text>
|
<text x="80" y="14">93%</text>
|
||||||
</g>
|
</g>
|
||||||
</svg>
|
</svg>
|
||||||
|
|
|
||||||
|
Before Width: | Height: | Size: 901 B After Width: | Height: | Size: 904 B |
|
|
@ -7,4 +7,4 @@ headers_file = ./headers_auth.json
|
||||||
own = owned_playlist_id
|
own = owned_playlist_id
|
||||||
|
|
||||||
[uploads]
|
[uploads]
|
||||||
file = song_in_project_root.mp3
|
file = song_in_tests_directory.mp3
|
||||||
|
|
@ -109,7 +109,7 @@ class TestYTMusic(unittest.TestCase):
|
||||||
|
|
||||||
def test_get_owned_playlist(self):
|
def test_get_owned_playlist(self):
|
||||||
playlist = youtube_auth.get_playlist(config['playlists']['own'], 300)
|
playlist = youtube_auth.get_playlist(config['playlists']['own'], 300)
|
||||||
self.assertEqual(len(playlist['tracks']), 284)
|
self.assertEqual(len(playlist['tracks']), 282)
|
||||||
|
|
||||||
def test_edit_playlist(self):
|
def test_edit_playlist(self):
|
||||||
playlist = youtube_auth.get_playlist(config['playlists']['own'])
|
playlist = youtube_auth.get_playlist(config['playlists']['own'])
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue