@@ -622,7 +622,7 @@ def test_join_utc_convert(self):
622
622
self .assert_ (isinstance (result , DatetimeIndex ))
623
623
self .assert_ (result .tz .zone == 'UTC' )
624
624
625
- def test_join_naive_with_aware (self ):
625
+ def test_join_aware (self ):
626
626
rng = date_range ('1/1/2011' , periods = 10 , freq = 'H' )
627
627
ts = Series (np .random .randn (len (rng )), index = rng )
628
628
@@ -631,6 +631,20 @@ def test_join_naive_with_aware(self):
631
631
self .assertRaises (Exception , ts .__add__ , ts_utc )
632
632
self .assertRaises (Exception , ts_utc .__add__ , ts )
633
633
634
+ test1 = DataFrame (np .zeros ((6 ,3 )),
635
+ index = date_range ("2012-11-15 00:00:00" , periods = 6 ,
636
+ freq = "100L" , tz = "US/Central" ))
637
+ test2 = DataFrame (np .zeros ((3 ,3 )),
638
+ index = date_range ("2012-11-15 00:00:00" , periods = 3 ,
639
+ freq = "250L" , tz = "US/Central" ),
640
+ columns = range (3 ,6 ))
641
+
642
+ result = test1 .join (test2 , how = 'outer' )
643
+ ex_index = test1 .index .union (test2 .index )
644
+
645
+ self .assertTrue (result .index .equals (ex_index ))
646
+ self .assertTrue (result .index .tz .zone == 'US/Central' )
647
+
634
648
def test_align_aware (self ):
635
649
idx1 = date_range ('2001' , periods = 5 , freq = 'H' , tz = 'US/Eastern' )
636
650
idx2 = date_range ('2001' , periods = 5 , freq = '2H' , tz = 'US/Eastern' )
0 commit comments