File: CONTRIBUTING

package info (click to toggle)
python-toml 0.10.0-1
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 208 kB
  • sloc: python: 1,278; makefile: 7; sh: 5
file content (50 lines) | stat: -rw-r--r-- 1,445 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
************
Contributing
************

Issues and Pull Requests are always welcome. Thank you in advance for
your contribution!

Reporting Issues
================

Before reporting an issue, please test the issue using the latest
development version to see if your issue has been fixed since the
latest release.

Testing
=======

### Unit tests
Unit tests can be run using [tox](https://tox.readthedocs.io/en/latest/).
Simply `pip install tox` and you are ready to go. Tox creates required
virual eniroments and installs necessary packages.

    tox

This is not very practical for day to day use. To easily run tests
in the current Python simply run.

    tox -e py

We are using [pytest](https://docs.pytest.org/en/latest/) testing framework.
You can pass parameters to it like this:

    tox -e py -- -vsx


### Decoding tests
There is a ``decoding_test.py`` script in the *tests/* directory
which acts as a harness in order to allow ``toml`` to be used with
the toml test suite, written (unfortunately) in Go.

Directions
----------

1. Install `Go <https://golang.org/>`_ (AKA golang)
2. Get the toml-test suite from `here <https://github.com/BurntSushi/toml-test>`_
   and follow the instructions under the **Try it out** section of the README.
3. Test your changes for both versions of Python:

  * For Python 2, use ``~/go/bin/toml-test ./tests/decoding_test2.sh``
  * For Python 3, use ``~/go/bin/toml-test ./tests/decoding_test3.sh``