diff --git a/vunit/test/bench_list.py b/vunit/test/bench_list.py index 8cc13d035..68a5f011e 100644 --- a/vunit/test/bench_list.py +++ b/vunit/test/bench_list.py @@ -45,7 +45,10 @@ def _add_test_bench(self, test_bench): self._libraries[test_bench.library_name][test_bench.name] = test_bench def get_test_bench(self, library_name, name): - return self._libraries[library_name][name] + try: + return self._libraries[library_name][name] + except KeyError: + return self._libraries[library_name][name.lower()] def get_test_benches_in_library(self, library_name): return list(self._libraries.get(library_name, {}).values()) diff --git a/vunit/ui/library.py b/vunit/ui/library.py index b57e78e04..840080e74 100644 --- a/vunit/ui/library.py +++ b/vunit/ui/library.py @@ -486,8 +486,6 @@ def test_bench(self, name): :returns: A :class:`.TestBench` object :raises: KeyError """ - name = name.lower() - return TestBench(self._test_bench_list.get_test_bench(self._library_name, name), self) def get_test_benches(self, pattern="*", allow_empty=False):