Skip to content

Commit 374c9ea

Browse files
committed
remove BadExamples class
1 parent 5aff727 commit 374c9ea

File tree

1 file changed

+2
-29
lines changed

1 file changed

+2
-29
lines changed

scripts/tests/test_validate_docstrings.py

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -514,33 +514,6 @@ def no_punctuation(self):
514514
return "Hello world!"
515515

516516

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-
544517
class TestValidator(object):
545518

546519
def _import_path(self, klass=None, func=None):
@@ -641,9 +614,9 @@ def test_bad_generic_functions(self, func):
641614
pytest.param('BadReturns', 'no_punctuation', ('foo',),
642615
marks=pytest.mark.xfail),
643616
# Examples tests
644-
('BadExamples', 'numpy_import',
617+
('BadGenericDocStrings', 'method',
645618
('Examples should not have `import numpy` ',)),
646-
('BadExamples', 'pandas_import',
619+
('BadGenericDocStrings', 'method',
647620
('Examples should not have `import pandas` ',))
648621
])
649622
def test_bad_examples(self, capsys, klass, func, msgs):

0 commit comments

Comments
 (0)