Skip to content

Commit

Permalink
docs: make the nature of content clearer
Browse files Browse the repository at this point in the history
In the end, the most misleading parameter for me was "binary" as it assumed I pass a file when I should instead pass the content of a file in a format that fits the data (bytes or text).

I updated the docstring to make it a bit clearer IMHO.
  • Loading branch information
12rambau authored and nicoddemus committed Nov 14, 2023
1 parent 1fc57cf commit b795be7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/pytest_regressions/file_regression.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ def check(
"""
Checks the contents against a previously recorded version, or generate a new file.
:param contents: content to be verified.
:param contents: content of the file to be verified as text or bytes.
:param encoding: Encoding used to write file, if any.
:param extension: Extension of file.
:param newline: See `io.open` docs.
:param binary: If the file is binary or text.
:param binary: If the provided content is binary or text.
:param obtained_filename: ..see:: FileRegressionCheck
:param check_fn: a function with signature ``(obtained_filename, expected_filename)`` that should raise
AssertionError if both files differ.
Expand Down

0 comments on commit b795be7

Please sign in to comment.