Skip to content

Commit 2c6cbfd

Browse files
committed
tests-sample-svgbob: adding sample set
Signed-off-by: James Knight <[email protected]>
1 parent 125e6d4 commit 2c6cbfd

File tree

3 files changed

+49
-0
lines changed

3 files changed

+49
-0
lines changed

tests/sample-sets/svgbob/conf.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
extensions = [
2+
'sphinxcontrib.confluencebuilder',
3+
'sphinxcontrib.svgbob',
4+
]

tests/sample-sets/svgbob/index.rst

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
Svgbob
2+
======
3+
4+
.. svgbob::
5+
:font-family: Arial
6+
:font-size: 12
7+
8+
+-------+ +--------+
9+
| Hello |------>| World! |
10+
+-------+ +--------+
11+
12+
Hamming distance between two strings of equal length is the number of
13+
positions at which the corresponding symbols are different. For instance,
14+
Hamming distance for a 3-bit string can be computed visually using a
15+
3-bit binary cube:
16+
17+
.. svgbob::
18+
:align: center
19+
20+
110 111
21+
*-----------*
22+
/| /|
23+
/ | 011 / |
24+
010 *--+--------* |
25+
| | 100 | |
26+
| *--------+--* 101
27+
| / | /
28+
|/ |/
29+
000 *-----------* 001
30+
31+
The minimum distance between any two vertices is the Hamming distance
32+
between the two bit vectors (e.g. 100→011 has distance 3).

tests/sample-sets/svgbob/tox.ini

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
[tox]
2+
package_root={toxinidir}{/}..{/}..{/}..
3+
4+
[testenv]
5+
deps =
6+
sphinxcontrib-svgbob
7+
commands =
8+
{envpython} -m tests.test_sample {posargs}
9+
setenv =
10+
PYTHONDONTWRITEBYTECODE=1
11+
TOX_INI_DIR={toxinidir}
12+
passenv = *
13+
use_develop = true

0 commit comments

Comments
 (0)