@@ -532,30 +532,14 @@ class TestMsgpack():
532
532
http://stackoverflow.com/questions/6689537/nose-test-generators-inside-class
533
533
"""
534
534
def setUp (self ):
535
- from pandas .io .tests .generate_legacy_storage_files import (
536
- create_msgpack_data , create_data )
535
+ from pandas .io .tests .generate_legacy_storage_files import create_msgpack_data
537
536
self .data = create_msgpack_data ()
538
- self .all_data = create_data ()
539
537
self .path = u ('__%s__.msgpack' % tm .rands (10 ))
540
- self .minimum_structure = {'series' : ['float' , 'int' , 'mixed' , 'ts' , 'mi' , 'dup' ],
541
- 'frame' : ['float' , 'int' , 'mixed' , 'mi' ],
542
- 'panel' : ['float' ],
543
- 'index' : ['int' , 'date' , 'period' ],
544
- 'mi' : ['reg2' ]}
545
-
546
- def check_min_structure (self , data ):
547
- for typ , v in self .minimum_structure .items ():
548
- assert typ in data , '"{0}" not found in unpacked data' .format (typ )
549
- for kind in v :
550
- assert kind in data [typ ], '"{0}" not found in data["{1}"]' .format (kind , typ )
551
538
552
539
def compare (self , vf ):
553
540
data = read_msgpack (vf )
554
- self .check_min_structure (data )
555
541
for typ , dv in data .items ():
556
- assert typ in self .all_data , 'unpacked data contains extra key "{0}"' .format (typ )
557
542
for dt , result in dv .items ():
558
- assert dt in self .all_data [typ ], 'data["{0}"] contains extra key "{1}"' .format (typ , dt )
559
543
try :
560
544
expected = self .data [typ ][dt ]
561
545
except KeyError :
0 commit comments