kopia lustrzana https://github.com/Hamlib/Hamlib
Make the tests for set_conf() and get_conf() more meaningful
rodzic
e2feb1d1d0
commit
3b79b13f6d
|
@ -27,11 +27,15 @@ class TestClass:
|
|||
assert amp.set_conf("", "") is None
|
||||
assert amp.get_conf("") == ""
|
||||
assert amp.get_conf(0) == ""
|
||||
conf = amp.get_conf("mcfg")
|
||||
assert isinstance(conf, str)
|
||||
assert amp.set_conf("mcfg", "foo") is None
|
||||
conf = amp.get_conf("mcfg")
|
||||
assert conf == "" # FIXME: should return "foo"
|
||||
if model == Hamlib.AMP_MODEL_DUMMY:
|
||||
conf = amp.get_conf("mcfg")
|
||||
assert conf == ""
|
||||
assert amp.set_conf("mcfg", "foobar") is None
|
||||
conf = amp.get_conf("mcfg")
|
||||
assert conf == "" # FIXME: should return "foobar"
|
||||
else:
|
||||
conf = amp.get_conf("mcfg")
|
||||
assert conf == ""
|
||||
|
||||
assert amp.token_lookup("") is None
|
||||
|
||||
|
|
|
@ -29,13 +29,14 @@ class TestClass:
|
|||
assert rig.set_conf("", "") is None
|
||||
assert rig.get_conf("") == ""
|
||||
assert rig.get_conf(0) == ""
|
||||
conf = rig.get_conf("mcfg")
|
||||
assert isinstance(conf, str)
|
||||
assert rig.set_conf("mcfg", "foo") is None
|
||||
conf = rig.get_conf("mcfg")
|
||||
if model == Hamlib.RIG_MODEL_DUMMY:
|
||||
assert conf == "foo"
|
||||
conf = rig.get_conf("mcfg")
|
||||
assert conf == "DX"
|
||||
assert rig.set_conf("mcfg", "foobar") is None
|
||||
conf = rig.get_conf("mcfg")
|
||||
assert conf == "foobar"
|
||||
else:
|
||||
conf = rig.get_conf("mcfg")
|
||||
assert conf == ""
|
||||
|
||||
assert rig.token_lookup("") is None
|
||||
|
|
|
@ -36,13 +36,14 @@ class TestClass:
|
|||
assert rot.set_conf("", "") is None
|
||||
assert rot.get_conf("") == ""
|
||||
assert rot.get_conf(0) == ""
|
||||
conf = rot.get_conf("mcfg")
|
||||
assert isinstance(conf, str)
|
||||
assert rot.set_conf("mcfg", "foo") is None
|
||||
conf = rot.get_conf("mcfg")
|
||||
if model == Hamlib.ROT_MODEL_DUMMY:
|
||||
assert conf == "foo"
|
||||
conf = rot.get_conf("mcfg")
|
||||
assert conf == "ROTATOR"
|
||||
assert rot.set_conf("mcfg", "foobar") is None
|
||||
conf = rot.get_conf("mcfg")
|
||||
assert conf == "foobar"
|
||||
else:
|
||||
conf = rot.get_conf("mcfg")
|
||||
assert conf == ""
|
||||
|
||||
assert rot.token_lookup("") is None
|
||||
|
|
Ładowanie…
Reference in New Issue