[python] Add negative MemoryBuffer testcase