def test_not_browsing_error(hist):
 with pytest.raises(ValueError) as error1:
  hist.nextitem()
 assert (str(error1.value) == 'Currently not browsing history')
 with pytest.raises(ValueError) as error2:
  hist.previtem()
 assert (str(error2.value) == 'Currently not browsing history')

def test_not_browsing_error ( hist ) : with pytest . raises ( ValueError ) as error1 : hist . nextitem ( ) assert ( str ( error1 . value ) == 'Currently not browsing history' ) with pytest . raises ( ValueError ) as error2 : hist . previtem ( ) assert ( str ( error2 . value ) == 'Currently not browsing history' )
test that next/previtem throws a valueerror .