#NEWLINE# def test_rasterize_resolution( tmpdir , runner , basic_feature ) : #NEWLINE# #INDENT# output = str ( tmpdir . join ( 'test.tif' ) ) #NEWLINE# result = runner . invoke ( main_group , [ 'rasterize' , output , '--res' , 0.15 ] , input = json . dumps ( output ) ) #NEWLINE# assert ( result . exit_code == 0 ) #NEWLINE# assert os . path . exists ( output ) #NEWLINE# with rasterio . open ( output ) as out : #NEWLINE# #INDENT# assert numpy . allclose ( out . bounds , ( 2 , 2 , 4.25 , 4.25 ) ) #NEWLINE# data = out . read ( 1 , masked = False ) #NEWLINE# assert ( data . shape == ( 15 , 15 ) ) #NEWLINE# assert numpy . all ( data )