Skip to content

Commit

Permalink
Fix type of string in doc (#784)
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelboulton committed Jun 5, 2022
1 parent 87f8ae9 commit bbba226
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion tavern/testutils/pytesthook/file.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ def __init__(self, *args, **kwargs):
# The 'docstring' for this is the filename, the 'docstring' for each
# individual test is the actual test name.
class FakeObj(object):
__doc__ = self.fspath
__doc__ = self.fspath.strpath

self.obj = FakeObj

Expand Down
7 changes: 7 additions & 0 deletions tests/unit/test_pytest_hooks.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,3 +155,10 @@ def test_double_double_single(self, faker):
# [w, x, y, z, 1, 2]
# etc.
assert len(tests) == 36


def test_doc_string():
args = mock_args()
y = YamlFile.from_parent(args.parent, fspath=args.fspath)

assert isinstance(y.obj.__doc__, str)

0 comments on commit bbba226

Please sign in to comment.