Skip to content

Commit cb67f01

Browse files
committed
Attempt to add a test for PR pandas-dev#25466
1 parent bfe626d commit cb67f01

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

scripts/tests/test_validate_docstrings.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import numpy as np
77
import pandas as pd
88

9-
import validate_docstrings
9+
from scripts import validate_docstrings
1010
validate_one = validate_docstrings.validate_one
1111

1212

@@ -1052,6 +1052,21 @@ def test_raises_for_invalid_attribute_name(self, invalid_name):
10521052
with pytest.raises(AttributeError, match=msg):
10531053
validate_docstrings.Docstring(invalid_name)
10541054

1055+
def missing_encoding_write_to_file(self):
1056+
"""
1057+
Examples
1058+
--------
1059+
>>> try:
1060+
... docstr = validate_docstrings.Docstring('pandas.Series.str.isdecimal')
1061+
... result = docstr.validate_pep8()
1062+
... next(result)
1063+
... print(1)
1064+
... except:
1065+
... 0
1066+
1
1067+
"""
1068+
pass
1069+
10551070

10561071
class TestMainFunction(object):
10571072
def test_exit_status_for_validate_one(self, monkeypatch):

0 commit comments

Comments
 (0)