@@ -234,24 +234,6 @@ def func(y):
234
234
direct_cov = errors .T .dot (errors ) / num_bootstrap
235
235
assert_allclose (cov , direct_cov )
236
236
237
- def test_smoke (self ):
238
- # TODO: Upgrade to meaningful test
239
- num_bootstrap = 20
240
-
241
- def func (y ):
242
- return y .mean (axis = 0 )
243
-
244
- bs = StationaryBootstrap (13 , self .y )
245
- bs .cov (func , reps = num_bootstrap )
246
- bs = MovingBlockBootstrap (13 , self .y )
247
- bs .cov (func , reps = num_bootstrap )
248
- bs = CircularBlockBootstrap (13 , self .y )
249
- bs .cov (func , reps = num_bootstrap )
250
- bs = MovingBlockBootstrap (10 , self .y )
251
- bs .cov (func , reps = num_bootstrap )
252
- bs = CircularBlockBootstrap (10 , self .y )
253
- bs .cov (func , reps = num_bootstrap )
254
-
255
237
def test_conf_int_basic (self ):
256
238
num_bootstrap = 200
257
239
bs = IIDBootstrap (self .x )
@@ -688,6 +670,20 @@ def test_str(self):
688
670
' <strong>ID</strong>: ' + hex (id (bs )) + ')'
689
671
assert_equal (bs ._repr_html (), expected )
690
672
673
+ bs = MovingBlockBootstrap (block_size = 20 , y = self .y_series ,
674
+ x = self .x_df )
675
+ expected = 'Moving Block Bootstrap(block size: 20, no. pos. ' \
676
+ 'inputs: 0, no. keyword inputs: 2)'
677
+ assert_equal (str (bs ), expected )
678
+ expected = expected [:- 1 ] + ', ID: ' + hex (id (bs )) + ')'
679
+ assert_equal (bs .__repr__ (), expected )
680
+ expected = '<strong>Moving Block Bootstrap</strong>' + \
681
+ '(<strong>block size</strong>: 20, ' \
682
+ + '<strong>no. pos. inputs</strong>: 0, ' + \
683
+ '<strong>no. keyword inputs</strong>: 2,' + \
684
+ ' <strong>ID</strong>: ' + hex (id (bs )) + ')'
685
+ assert_equal (bs ._repr_html (), expected )
686
+
691
687
@pytest .mark .skipif (not HAS_EXTENSION , reason = 'Extension not built.' )
692
688
def test_samplers (self ):
693
689
"""
0 commit comments