@@ -377,7 +377,10 @@ def test_its():
377
377
assert isinstance (ax , np .ndarray ) and all (
378
378
isinstance (item , plt .Axes ) for item in ax
379
379
), "ax must be a numpy.ndarray of plt.Axes"
380
-
380
+ plot_data = result .get_plot_data ()
381
+ assert isinstance (plot_data , pd .DataFrame ), "The returned object is not a pandas DataFrame"
382
+ expected_columns = ['prediction' , 'pred_hdi_lower' , 'pred_hdi_upper' , 'impact' , 'impact_hdi_lower' , 'impact_hdi_upper' ]
383
+ assert set (expected_columns ).issubset (set (plot_data .columns )), f"DataFrame is missing expected columns { expected_columns } "
381
384
382
385
@pytest .mark .integration
383
386
def test_its_covid ():
@@ -414,6 +417,10 @@ def test_its_covid():
414
417
assert isinstance (ax , np .ndarray ) and all (
415
418
isinstance (item , plt .Axes ) for item in ax
416
419
), "ax must be a numpy.ndarray of plt.Axes"
420
+ plot_data = result .get_plot_data ()
421
+ assert isinstance (plot_data , pd .DataFrame ), "The returned object is not a pandas DataFrame"
422
+ expected_columns = ['prediction' , 'pred_hdi_lower' , 'pred_hdi_upper' , 'impact' , 'impact_hdi_lower' , 'impact_hdi_upper' ]
423
+ assert set (expected_columns ).issubset (set (plot_data .columns )), f"DataFrame is missing expected columns { expected_columns } "
417
424
418
425
419
426
@pytest .mark .integration
@@ -455,7 +462,10 @@ def test_sc():
455
462
assert isinstance (ax , np .ndarray ) and all (
456
463
isinstance (item , plt .Axes ) for item in ax
457
464
), "ax must be a numpy.ndarray of plt.Axes"
458
-
465
+ plot_data = result .get_plot_data ()
466
+ assert isinstance (plot_data , pd .DataFrame ), "The returned object is not a pandas DataFrame"
467
+ expected_columns = ['prediction' , 'pred_hdi_lower' , 'pred_hdi_upper' , 'impact' , 'impact_hdi_lower' , 'impact_hdi_upper' ]
468
+ assert set (expected_columns ).issubset (set (plot_data .columns )), f"DataFrame is missing expected columns { expected_columns } "
459
469
460
470
@pytest .mark .integration
461
471
def test_sc_brexit ():
@@ -501,6 +511,10 @@ def test_sc_brexit():
501
511
assert isinstance (ax , np .ndarray ) and all (
502
512
isinstance (item , plt .Axes ) for item in ax
503
513
), "ax must be a numpy.ndarray of plt.Axes"
514
+ plot_data = result .get_plot_data ()
515
+ assert isinstance (plot_data , pd .DataFrame ), "The returned object is not a pandas DataFrame"
516
+ expected_columns = ['prediction' , 'pred_hdi_lower' , 'pred_hdi_upper' , 'impact' , 'impact_hdi_lower' , 'impact_hdi_upper' ]
517
+ assert set (expected_columns ).issubset (set (plot_data .columns )), f"DataFrame is missing expected columns { expected_columns } "
504
518
505
519
506
520
@pytest .mark .integration
0 commit comments