@@ -514,33 +514,6 @@ def no_punctuation(self):
514
514
return "Hello world!"
515
515
516
516
517
- class BadExamples (object ):
518
-
519
- def numpy_import (self ):
520
- """
521
- Provide example with numpy import.
522
-
523
- Examples
524
- --------
525
- This example does not import pandas.
526
- >>> import numpy as np
527
- >>> import datetime
528
- """
529
- pass
530
-
531
- def pandas_import (self ):
532
- """
533
- Provide example with pandas import.
534
-
535
- Examples
536
- --------
537
- This example does not import numpy.
538
- >>> import pandas as pd
539
- >>> import pickle
540
- """
541
- pass
542
-
543
-
544
517
class TestValidator (object ):
545
518
546
519
def _import_path (self , klass = None , func = None ):
@@ -641,9 +614,9 @@ def test_bad_generic_functions(self, func):
641
614
pytest .param ('BadReturns' , 'no_punctuation' , ('foo' ,),
642
615
marks = pytest .mark .xfail ),
643
616
# Examples tests
644
- ('BadExamples ' , 'numpy_import ' ,
617
+ ('BadGenericDocStrings ' , 'method ' ,
645
618
('Examples should not have `import numpy` ' ,)),
646
- ('BadExamples ' , 'pandas_import ' ,
619
+ ('BadGenericDocStrings ' , 'method ' ,
647
620
('Examples should not have `import pandas` ' ,))
648
621
])
649
622
def test_bad_examples (self , capsys , klass , func , msgs ):
0 commit comments