blob: dcd83511b9cef38c15b6a56bccd68b3a593c7321 (
plain)
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
|
import pytest # NOQA
# import ruamel.yaml
from roundtrip import round_trip
class TestProgramConfig:
def test_application_arguments(self):
# application configur
round_trip("""
args:
username: anthon
passwd: secret
fullname: Anthon van der Neut
tmux:
session-name: test
loop:
wait: 10
""")
def test_single(self):
# application configuration
round_trip("""
# default arguments for the program
args: # needed to prevent comment wrapping
# this should be your username
username: anthon
passwd: secret # this is plaintext don't reuse \
# important/system passwords
fullname: Anthon van der Neut
tmux:
session-name: test # make sure this doesn't clash with
# other sessions
loop: # looping related defaults
# experiment with the following
wait: 10
# no more argument info to pass
""")
def test_multi(self):
# application configuration
round_trip("""
# default arguments for the program
args: # needed to prevent comment wrapping
# this should be your username
username: anthon
passwd: secret # this is plaintext don't reuse
# important/system passwords
fullname: Anthon van der Neut
tmux:
session-name: test # make sure this doesn't clash with
# other sessions
loop: # looping related defaults
# experiment with the following
wait: 10
# no more argument info to pass
""")
|