def test_extract_messages_without_rawsource():
 p = nodes.paragraph()
 p.append(nodes.Text('test'))
 p.append(nodes.Text('sentence'))
 assert (not p.rawsource)
 document = create_new_document()
 document.append(p)
 _transform(document)
 assert_node_count(extract_messages(document), nodes.TextElement, 1)
 assert [m for (n, m) in extract_messages(document)][0], 'text sentence'

def test_extract_messages_without_rawsource ( ) : p = nodes . paragraph ( ) p . append ( nodes . Text ( 'test' ) ) p . append ( nodes . Text ( 'sentence' ) ) assert ( not p . rawsource ) document = create_new_document ( ) document . append ( p ) _transform ( document ) assert_node_count ( extract_messages ( document ) , nodes . TextElement , 1 ) assert [ m for ( n , m ) in extract_messages ( document ) ] [ 0 ] , 'text sentence'
check node .