Update coverage instructions and badge

This commit is contained in:
sigma67 2020-05-18 16:42:03 +02:00
commit 7ee10c2c92
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
4 changed files with 15 additions and 9 deletions

View file

@ -11,12 +11,18 @@ Adjust the file to contain appropriate information for your YouTube account and
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.

View file

@ -9,13 +9,13 @@
</mask>
<g mask="url(#a)">
<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"/>
</g>
<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="14">coverage</text>
<text x="80" y="15" fill="#010101" fill-opacity=".3">95%</text>
<text x="80" y="14">95%</text>
<text x="80" y="15" fill="#010101" fill-opacity=".3">93%</text>
<text x="80" y="14">93%</text>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 901 B

After

Width:  |  Height:  |  Size: 904 B

Before After
Before After

View file

@ -7,4 +7,4 @@ headers_file = ./headers_auth.json
own = owned_playlist_id
[uploads]
file = song_in_project_root.mp3
file = song_in_tests_directory.mp3

View file

@ -109,7 +109,7 @@ class TestYTMusic(unittest.TestCase):
def test_get_owned_playlist(self):
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):
playlist = youtube_auth.get_playlist(config['playlists']['own'])