[docs] update

This commit is contained in:
Tobias Witek 2020-06-18 07:14:10 +02:00
parent e139c4211c
commit b9754a5b3e
3 changed files with 44 additions and 0 deletions

View file

@ -31,6 +31,15 @@ Supported Python versions: 3.4, 3.5, 3.6, 3.7, 3.8
Supported FontAwesome version: 4 (free version of 5 doesn't include some of the icons)
---
**NOTE**
I am planning to rename `master` to `main` - the branch already exists, and I will eventually change the **default** branch to `main`. Just be advised :)
If you are curious why: [ZDNet:github-master-alternative](https://www.zdnet.com/article/github-to-replace-master-with-alternative-term-to-avoid-slavery-references/)
---
Example usage:
```

View file

@ -0,0 +1,34 @@
General guidelines
==================
Writing unit tests
------------------
Some general hints:
- Tests should run with just Python Standard Library modules installed
(i.e. if there are additional requirements, the test should be skipped
if those are missing)
- Tests should run even if there is no network connectivity (please mock
urllib calls, for example)
- Tests should be stable and not require modifications every time the
tested code's implementation changes slightly (been there / done that)
Right now, ``bumblebee-status`` is moving away from Python's
built-in ``unittest`` framework (tests located inside ``tests/``)
and towards ``pytest`` (tests located inside ``pytests/``).
First implication: To run the new tests, you need to have ``pytest``
installed, it is not part of the Python Standard Library. Most
distributions call the package ``python-pytest`` or ``python3-pytest``
or something similar (or you just use ``pip install --use pytest``)
Aside from that, you just write you tests using ``pytest`` as usual,
with one big caveat:
**If** you create a new directory inside ``pytests/``, you need to
also create a file called ``__init__.py`` inside that, otherwise,
modules won't load correctly.
For examples, just browse the existing code. A good, minimal sample
for unit testing ``bumblebee-status`` is ``pytests/core/test_event.py``.

View file

@ -5,6 +5,7 @@ Developer's Guide
:maxdepth: 2
:caption: Contents:
general
module
theme