Clear cache rather than reassign, correct ALPHA case check and creation

This commit is contained in:
John Morrison
2022-04-23 07:57:39 +01:00
committed by xs5871
parent bdc2bbb3cf
commit bb8dec907a
2 changed files with 24 additions and 33 deletions

View File

@@ -99,8 +99,7 @@ class TestKmkKeys(unittest.TestCase):
class TestKeys_dot(unittest.TestCase):
def setUp(self):
global KC
KC = KeyAttrDict()
KC.clear()
def test_expected_code_uppercase(self):
assert 4 == KC.A.code
@@ -150,8 +149,7 @@ class TestKeys_dot(unittest.TestCase):
class TestKeys_index(unittest.TestCase):
def setUp(self):
global KC
KC = KeyAttrDict()
KC.clear()
def test_expected_code_uppercase(self):
assert 4 == KC['A'].code
@@ -196,8 +194,7 @@ class TestKeys_index(unittest.TestCase):
class TestKeys_get(unittest.TestCase):
def setUp(self):
global KC
KC = KeyAttrDict()
KC.clear()
def test_expected_code_uppercase(self):
assert 4 == KC.get('A').code
@@ -248,8 +245,7 @@ class TestKeys_get(unittest.TestCase):
# order of request doesn't matter
class TestKeys_instances(unittest.TestCase):
def setUp(self):
global KC
KC = KeyAttrDict()
KC.clear()
def test_make_key_new_instance(self):
key1 = make_key(code=1)