File: README.source

package info (click to toggle)
reportbug 13.2.0
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 1,248 kB
  • sloc: python: 9,838; sh: 70; makefile: 41; lisp: 31
file content (81 lines) | stat: -rw-r--r-- 2,175 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Source layout
=============

The source tree for ``reportbug`` is organised this way:

* Top level

  * Installation tools

* Debian packaging

  * ``debian/`` contains the control files used to build the Debian
    source and binary packages.

* Programs

  * ``bin/`` contains the end-user programs (e.g. ``reportbug``,
    ``querybts``).

* Libraries

  * ``reportbug/`` contains the Python library module package used by
    the programs.

* `Unit testing framework`_

  * ``test/`` contains the unit test suite. Unit test modules are
    discovered and run using the ``pytest-3`` program, and are named
    as ``test_*.py``.

* Documentation

  * ``doc/`` contains documentation for both users and developers.

* Manual pages

  * ``man/`` contains the manual pages for the programs.

Unit testing framework
======================

The reportbug source package now has a unit testing framework.

The directory ``test/`` contains unit test modules and supporting
files. New unit test modules should be added to this directory and
named ``test_*.py``.

The unit test suite depends on the `python3-pytest` package being
installed, to make the ``pytest-3`` command available. The unit tests
themselves can be written using the `unittest` modules in the standard
Python library.

The ``data/`` contains some additional files required by tests, such as
control files, scripts, etc.

``make`` targets for testing and quality checks
-----------------------------------------------

The following ``make`` targets are useful for testing and related
tasks.

* ``make tests`` runs the unit test suite, preceded by a timestamp
  banner, and reports any test failures or "OK" if all tests pass. Coverage
  reports are generated automatically.

* ``make quicktests`` runs the unit test suite, but only for those
  tests that dont require network access, which can be slow sometimes
  (hence the name)

* ``make lint`` runs the `flake8` code checker on all code modules and
  programs.

  This requires the `flake8` package to be installed. See its
  documentation for more about its operation.

..
    Local Variables:
    coding: utf-8
    mode: rst
    End:
    vim: filetype=rst :