summaryrefslogtreecommitdiff
path: root/HACKING.rst
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-15 18:40:01 +0900
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2016-11-15 18:40:01 +0900
commit20218b79c4e3b4073dcee1891dd4d7fb16680e4a (patch)
tree93315bcda9d8fc572fe474eae9b6299718c70f9d /HACKING.rst
parent6525b21881a4f9e28cc571fdb7968c57261a4764 (diff)
downloadbuildstream-20218b79c4e3b4073dcee1891dd4d7fb16680e4a.tar.gz
HACKING.rst: restructuredtext fixups
Diffstat (limited to 'HACKING.rst')
-rw-r--r--HACKING.rst26
1 files changed, 9 insertions, 17 deletions
diff --git a/HACKING.rst b/HACKING.rst
index de4278376..4857e1e2c 100644
--- a/HACKING.rst
+++ b/HACKING.rst
@@ -11,10 +11,7 @@ Coding style details for BuildStream
Style Guide
~~~~~~~~~~~
-Python coding style for BuildStream is pep8.
-
-This is documented here:
- https://www.python.org/dev/peps/pep-0008/
+Python coding style for BuildStream is pep8, which is documented here: https://www.python.org/dev/peps/pep-0008/
You may find deviances from this standard in the sources, if so
then feel free to file that as a bug and it will be fixed.
@@ -24,11 +21,11 @@ Imports
~~~~~~~
Module imports inside BuildStream are done with . notation
-Good:
+Good::
from .context import Context
-Bad:
+Bad::
from buildstream.context import Context
@@ -36,7 +33,7 @@ The exception to the above rule is when authoring plugins,
plugins do not reside in the same namespace so they must
address buildstream in the imports.
-An element plugin will derive from Element by importing:
+An element plugin will derive from Element by importing::
from buildstream import Element
@@ -129,17 +126,14 @@ Testing BuildStream
BuildStream uses pytest for regression tests and testing out
the behavior of newly added components.
-The elaborate documentation for pytest can be found here:
-
- http://doc.pytest.org/en/latest/contents.html
+The elaborate documentation for pytest can be found here: http://doc.pytest.org/en/latest/contents.html
-Don't get lost in the docs if you don't need to, follow
-existing examples instead.
+Don't get lost in the docs if you don't need to, follow existing examples instead.
Running Tests
~~~~~~~~~~~~~
-To run the tests, just type:
+To run the tests, just type::
./setup.py test
@@ -147,7 +141,7 @@ At the toplevel.
When debugging a test, it can be desirable to see the stdout
and stderr generated by a test, to do this use the --addopts
-function to feed arguments to pytest as such:
+function to feed arguments to pytest as such::
./setup.py test --addopts -s
@@ -167,6 +161,4 @@ a subdirectory beside your test in which to store data.
When creating a test that needs data, use the datafiles extension
to decorate your test case (again, examples exist in the existing
tests for this), documentation on the datafiles extension can
-be found here:
-
- https://pypi.python.org/pypi/pytest-datafiles
+be found here: https://pypi.python.org/pypi/pytest-datafiles