def test_get_words_r():
 expected_words = ['Hello', 'function', 'hello', 'name', 's', 'sprintf']
 assert (sorted(expected_words) == sorted(get_words_by_filename('example.R')))
 assert (sorted(expected_words) == sorted(get_words_by_content('example.R')))

def test_get_words_r ( ) : expected_words = [ 'Hello' , 'function' , 'hello' , 'name' , 's' , 'sprintf' ] assert ( sorted ( expected_words ) == sorted ( get_words_by_filename ( 'example.R' ) ) ) assert ( sorted ( expected_words ) == sorted ( get_words_by_content ( 'example.R' ) ) )
test for get word from r file syntax .