Skip to content

Commit 466058e

Browse files
committed
Remove superfluous tests
I'm going to explain why these tests are superfluous because I don't like removing tests. The asserts were all asserting something that does not need to be true: that the toolchain's `name` attribute matched it's key in the `TOOLCHIAN_CLASSES` dictionary. With that out of the way, the `test_instantiation` test did not assert anything, and is therefore not a test.
1 parent 17d35bf commit 466058e

File tree

1 file changed

+0
-15
lines changed

1 file changed

+0
-15
lines changed

tools/test/toolchains/api_test.py

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@
1515
Resources, TOOLCHAIN_PATHS, mbedToolchain
1616
from tools.targets import TARGET_MAP
1717

18-
def test_instantiation():
19-
"""Test that all exported toolchain may be instantiated"""
20-
for name, tc_class in TOOLCHAIN_CLASSES.items():
21-
cls = tc_class(TARGET_MAP["K64F"])
22-
assert name == cls.name or\
23-
name == LEGACY_TOOLCHAIN_NAMES[cls.name]
24-
2518
ALPHABET = [char for char in printable if char not in [u'.', u'/']]
2619

2720
@given(fixed_dictionaries({
@@ -115,10 +108,6 @@ def test_toolchain_profile_asm(profile, source_file):
115108
"Toolchain %s did not propagate arg %s" % (toolchain.name,
116109
parameter)
117110

118-
for name, Class in TOOLCHAIN_CLASSES.items():
119-
CLS = Class(TARGET_MAP["K64F"])
120-
assert name == CLS.name or name == LEGACY_TOOLCHAIN_NAMES[CLS.name]
121-
122111
@given(fixed_dictionaries({
123112
'common': lists(text()),
124113
'c': lists(text()),
@@ -152,10 +141,6 @@ def test_toolchain_profile_ld(profile, source_file):
152141
"Toolchain %s did not propagate arg %s" % (toolchain.name,
153142
parameter)
154143

155-
for name, Class in TOOLCHAIN_CLASSES.items():
156-
CLS = Class(TARGET_MAP["K64F"])
157-
assert name == CLS.name or name == LEGACY_TOOLCHAIN_NAMES[CLS.name]
158-
159144

160145
@given(lists(text(alphabet=ALPHABET, min_size=1), min_size=1))
161146
def test_detect_duplicates(filenames):

0 commit comments

Comments
 (0)