diff options
Diffstat (limited to '')
-rw-r--r-- | _test/test_program_config.py | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/_test/test_program_config.py b/_test/test_program_config.py new file mode 100644 index 0000000..d633f72 --- /dev/null +++ b/_test/test_program_config.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +import pytest # NOQA + +# import ruyaml +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 + """ + ) |