Fix RST inline code formatting

This commit is contained in:
sigma67 2020-05-15 20:59:01 +02:00
commit 14eb04e273
No known key found for this signature in database
GPG key ID: 1545A01D4474BAF0
3 changed files with 9 additions and 9 deletions

View file

@ -28,6 +28,6 @@ Before committing, run style and linter checks using
Code structure Code structure
--------------- ---------------
The folder `ytmusicapi` contains the main library which is distributed to the users. The folder ``ytmusicapi`` contains the main library which is distributed to the users.
Each main library function in `ytmusic.py` is covered by a test in the `tests` folder. Each main library function in ``ytmusic.py`` is covered by a test in the ``tests`` folder.
If you want to contribute a new function, please create a corresponding unittest. If you want to contribute a new function, please create a corresponding unittest.

View file

@ -23,7 +23,7 @@ in the correct format in the current directory.
Manual file creation Manual file creation
-------------------- --------------------
Alternatively, you can paste the cookie to `headers_auth.json` below and create your own file: Alternatively, you can paste the cookie to ``headers_auth.json`` below and create your own file:
.. literalinclude:: ../../headers_auth.json.example .. literalinclude:: ../../headers_auth.json.example
:language: JSON :language: JSON

View file

@ -1,22 +1,22 @@
Package tests Package tests
============================================ ============================================
Tests use the `unittest` framework. Each function has a corresponding unittest. Tests use the ``unittest`` framework. Each function has a corresponding unittest.
Sometimes there is a single unittest for multiple functions to ensure there are no permanent changes in the user's YouTube account (i.e. subscribe and unsubscribe). Sometimes there is a single unittest for multiple functions to ensure there are no permanent changes in the user's YouTube account (i.e. subscribe and unsubscribe).
Note that there must be a `headers_auth.json` in the project root to run authenticated tests. Note that there must be a ``headers_auth.json`` in the project root to run authenticated tests.
For testing the song upload, there also needs to be a file with the name specified in the code in the project root. For testing the song upload, there also needs to be a file with the name specified in the code in the project root.
Copy `tests/test.cfg.example` to `test.cfg` in the project root to run tests with coverage. Copy ``tests/test.cfg.example`` to ``test.cfg`` in the project root to run tests with coverage.
Adjust the file to contain appropriate information for your YouTube account and local setup. Adjust the file to contain appropriate information for your YouTube account and local setup.
Coverage badge Coverage badge
-------------- --------------
Install `coverage` and `coverage-badge` with pip. Run Install ``coverage`` and ``coverage-badge`` with pip. Run
`coverage run --source=ytmusicapi -m unittest discover tests` ``coverage run --source=ytmusicapi -m unittest discover tests``
to generate a coverage report in the project root. With to generate a coverage report in the project root. With
`coverage-badge -o tests/coverage.svg -f` ``coverage-badge -o tests/coverage.svg -f``
you generate the badge. you generate the badge.