added regression test

This commit is contained in:
A_D authored and Athanasius committed 2021-04-01 14:45:50 +01:00
1 parent f5575e5b8e
commit ee4451560a
1 file changed
+14 -2
+14 -2
View File
@@ -108,10 +108,10 @@ class TestNewConfig:
"""Save a list and then ask for it back."""
name = f'list_test_{ hash("".join(lst)) }'
config.set(name, lst)
config.save()
self.__update_linuxconfig()
assert lst == config.get_list(name)
config.delete(name)
@@ -126,6 +126,18 @@ class TestNewConfig:
assert b == config.get_bool(name)
config.delete(name)
def test_get_no_error(self) -> None:
"""Regression test to ensure that get() doesn't throw a TypeError."""
name = 'test-get'
config.set(name, '1337')
config.save()
self.__update_linuxconfig()
with pytest.deprecated_call():
res = config.get(name)
assert res == '1337'
config.delete(name)
class TestOldNewConfig:
"""Tests going through the old config and out the new config."""