MCPcopy Create free account
hub / github.com/NVIDIA/DALI / test_invalid_wildcard

Function test_invalid_wildcard

dali/test/python/operator_2/test_reshape.py:414–423  ·  view source on GitHub ↗
(rel_shape)

Source from the content-addressed store, hash-verified

412
413@params([1, -1, 1], np.float32([1, -1, 1]))
414def test_invalid_wildcard(rel_shape):
415 shapes = [[480, 640], [320, 240]]
416 pipe = reshape_pipe(
417 batch_size=len(shapes), num_threads=1, device_id=0, shapes=shapes, rel_shape=rel_shape
418 )
419 err_glob = (
420 "*`rel_shape` has more elements (3) than*dimensions in the input (2)*" "use `src_dims`*"
421 )
422 with assert_raises(RuntimeError, glob=err_glob):
423 pipe.run()
424
425
426def test_wildcard_zero_volume():

Callers

nothing calls this directly

Calls 3

assert_raisesFunction · 0.90
reshape_pipeFunction · 0.85
runMethod · 0.45

Tested by

no test coverage detected