#NEWLINE# def test_sieve_read( tmpdir ) : #NEWLINE# #INDENT# outfile = str ( tmpdir . join ( 'out.tif' ) ) #NEWLINE# runner = CliRunner ( ) #NEWLINE# result = runner . invoke ( calc , [ "(sieve (read 1 1 'uint8') 42)" , 'tests/data/shade.tif' , outfile ] , catch_exceptions = False ) #NEWLINE# assert ( result . exit_code == 0 ) #NEWLINE# with rasterio . open ( outfile ) as src : #NEWLINE# #INDENT# assert ( src . count == 1 ) #NEWLINE# assert ( src . meta [ 'dtype' ] == 'uint8' )