<s> from __future__ import absolute_import , division , print_function <EOL> import json <EOL> import unittest <EOL> from io import BytesIO <EOL> from . . sample import sample_geojson <EOL> class TestSample ( unittest . TestCase ) : <EOL> def test_sample ( self ) : <EOL> geojson_input = b'''<STR_LIT>''' <EOL> geojson0 = json . loads ( sample_geojson ( BytesIO ( geojson_input ) , max_features = <NUM_LIT:0> ) ) <EOL> self . assertEqual ( len ( geojson0 [ '<STR_LIT>' ] ) , <NUM_LIT:0> ) <EOL> geojson1 = json . loads ( sample_geojson ( BytesIO ( geojson_input ) , max_features = <NUM_LIT:1> ) ) <EOL> self . assertEqual ( len ( geojson1 [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> geojson2 = json . loads ( sample_geojson ( BytesIO ( geojson_input ) , max_features = <NUM_LIT:2> ) ) <EOL> self . assertEqual ( len ( geojson2 [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> geojson3 = json . loads ( sample_geojson ( BytesIO ( geojson_input ) , max_features = <NUM_LIT:3> ) ) <EOL> self . assertEqual ( len ( geojson3 [ '<STR_LIT>' ] ) , <NUM_LIT:3> ) <EOL> geojson4 = json . loads ( sample_geojson ( BytesIO ( geojson_input ) , max_features = <NUM_LIT:4> ) ) <EOL> self . assertEqual ( len ( geojson4 [ '<STR_LIT>' ] ) , <NUM_LIT:3> ) <EOL> self . assertEqual ( geojson0 [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:2> ) <EOL> self . assertEqual ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] , <NUM_LIT> ) <EOL> self . assertEqual ( geojson1 [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:1> ] , <NUM_LIT> ) <EOL> self . assertEqual ( geojson2 [ '<STR_LIT>' ] [ <NUM_LIT:1> ] [ '<STR_LIT>' ] [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( geojson2 [ '<STR_LIT>' ] [ <NUM_LIT:1> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:4> ) <EOL> self . assertEqual ( geojson2 [ '<STR_LIT>' ] [ <NUM_LIT:1> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] , <NUM_LIT> ) <EOL> self . assertEqual ( geojson2 [ '<STR_LIT>' ] [ <NUM_LIT:1> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] , <NUM_LIT:0.> ) <EOL> self . assertEqual ( geojson3 [ '<STR_LIT>' ] [ <NUM_LIT:2> ] [ '<STR_LIT>' ] [ '<STR_LIT:type>' ] , '<STR_LIT>' ) <EOL> self . assertEqual ( len ( geojson3 [ '<STR_LIT>' ] [ <NUM_LIT:2> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] ) , <NUM_LIT:1> ) <EOL> self . assertEqual ( geojson3 [ '<STR_LIT>' ] [ <NUM_LIT:2> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] , <NUM_LIT> ) <EOL> self . assertEqual ( geojson3 [ '<STR_LIT>' ] [ <NUM_LIT:2> ] [ '<STR_LIT>' ] [ '<STR_LIT>' ] [ <NUM_LIT:0> ] [ <NUM_LIT:0> ] [ <NUM_LIT:1> ] , <NUM_LIT:0.> ) </s>
