Reikriam

gentest

Aug 18th, 2020 (edited)
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. def test_cpuawkward_new_Identities64_1():
  2. toptr = [123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123, 123]
  3. toptr = (ctypes.c_int64*len(toptr))(*toptr)
  4. length = 3
  5. funcC = getattr(lib, 'awkward_new_Identities64')
  6. funcC.restype = Error
  7. funcC.argtypes = (ctypes.POINTER(ctypes.c_int64), ctypes.c_int64)
  8. ret_pass = funcC(toptr, length)
  9. pytest_toptr = [0, 1, 2]
  10. assert toptr[:len(pytest_toptr)] == pytest.approx(pytest_toptr)
  11. assert not ret_pass.str
Advertisement
Add Comment
Please, Sign In to add comment