def METHOD_NAME(self):
    def test_filetype_to_instance(extension, klass):
        print(f"testing: {extension}")
        try:
            if extension == ".blf":
                delete = False
                file_handler = open(
                    join(dirname(__file__), "data", "test_CanMessage.blf")
                )
            else:
                delete = True
                file_handler = tempfile.NamedTemporaryFile(
                    suffix=extension, delete=False
                )
            with file_handler as my_file:
                filename = my_file.name
            with can.LogReader(filename) as reader:
                self.assertIsInstance(reader, klass)
        finally:
            if delete:
                os.remove(filename)
    test_filetype_to_instance(".asc", can.ASCReader)
    test_filetype_to_instance(".blf", can.BLFReader)
    test_filetype_to_instance(".csv", can.CSVReader)
    test_filetype_to_instance(".db", can.SqliteReader)
    test_filetype_to_instance(".log", can.CanutilsLogReader)