import ctypes test_string = ctypes.c_char_p("This Is a test string, that should be of type bytes") print (test_string.value) print ("Typeof test_string {}",type(test_string)) print ("Typeof test_string {}",type(test_string.value)) assert(type(test_string.value) == bytes)