<s> import math <EOL> import pytest <EOL> from bayeslite . util import cursor_value <EOL> def test_cursor_value ( ) : <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ] ) ) <EOL> with pytest . raises ( TypeError ) : <EOL> cursor_value ( iter ( [ <NUM_LIT:1> ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ <NUM_LIT:1> , <NUM_LIT:2> ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( ) ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , <NUM_LIT:2> ) ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , <NUM_LIT:2> ) , ( ) ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , <NUM_LIT:2> ) , <NUM_LIT:3> ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , <NUM_LIT:2> ) , ( <NUM_LIT:3> , ) ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , ) , ( <NUM_LIT:2> , ) ] ) ) <EOL> with pytest . raises ( ValueError ) : <EOL> cursor_value ( iter ( [ ( <NUM_LIT:1> , ) , ( <NUM_LIT:2> , <NUM_LIT:3> ) ] ) ) <EOL> assert cursor_value ( iter ( [ ( <NUM_LIT> , ) ] ) ) == <NUM_LIT> </s>
