def test_datasource_untouched():
 original_data = copy.deepcopy(MEMORY_DATA)
 table = UnorderedTable(MEMORY_DATA)
 table.order_by = u'i'
 list(table.rows)
 assert (MEMORY_DATA == original_data)
 table = UnorderedTable(MEMORY_DATA)
 table.order_by = u'beta'
 list(table.rows)
 assert (MEMORY_DATA == original_data)

def test_datasource_untouched ( ) : original_data = copy . deepcopy ( MEMORY_DATA ) table = UnorderedTable ( MEMORY_DATA ) table . order_by = u'i' list ( table . rows ) assert ( MEMORY_DATA == original_data ) table = UnorderedTable ( MEMORY_DATA ) table . order_by = u'beta' list ( table . rows ) assert ( MEMORY_DATA == original_data )
ensure that data that is provided to the table is not modified by table operations .