forked from MakeMagazinDE/BrachioGraph
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest_brachiograph.py
executable file
·51 lines (32 loc) · 937 Bytes
/
test_brachiograph.py
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
import pytest
from brachiograph import BrachioGraph
virtual_bg = BrachioGraph(
inner_arm=8,
outer_arm=8,
bounds=(-6, 4, 6, 12),
virtual_mode=True
)
# ----------------- drawing methods -----------------
def test_plot_from_file():
virtual_bg.plot_file("test-patterns/test-pattern.json")
# ----------------- test pattern methods -----------------
def test_test_pattern():
virtual_bg.test_pattern()
def test_vertical_lines():
virtual_bg.vertical_lines()
def test_horizontal_lines():
virtual_bg.horizontal_lines()
def test_box():
virtual_bg.box()
# ----------------- pen-moving methods -----------------
def test_centre():
virtual_bg.centre()
# ----------------- reporting methods -----------------
def test_report():
virtual_bg.report()
def test_maths_errors():
plotter = BrachioGraph(
inner_arm=8.2,
outer_arm=8.85,
)
plotter.xy_to_angles(-10.2, 13.85)