summaryrefslogtreecommitdiff
path: root/coverage/test_helpers.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2015-01-22 23:31:41 -0500
committerNed Batchelder <ned@nedbatchelder.com>2015-01-22 23:31:41 -0500
commita35f7161de5eb0e9c40adc026a0d40e6bd1296af (patch)
treed4b5cd50bbb649ca51bea50488053fae0505ebc6 /coverage/test_helpers.py
parentf8892d89e12ff0678b1256ef3863103f11a0e34f (diff)
downloadpython-coveragepy-a35f7161de5eb0e9c40adc026a0d40e6bd1296af.tar.gz
Clarify how to use make_file for non-ascii content.
Diffstat (limited to 'coverage/test_helpers.py')
-rw-r--r--coverage/test_helpers.py12
1 files changed, 8 insertions, 4 deletions
diff --git a/coverage/test_helpers.py b/coverage/test_helpers.py
index 665593a..b49e75d 100644
--- a/coverage/test_helpers.py
+++ b/coverage/test_helpers.py
@@ -189,10 +189,14 @@ class TempDirMixin(SysPathAwareMixin, ModuleAwareMixin, TestCase):
"""Create a file for testing.
`filename` is the relative path to the file, including directories if
- desired, which will be created if need be. `text` is the content to
- create in the file. If `newline` is provided, it is a string that will
- be used as the line endings in the created file, otherwise the line
- endings are as provided in `text`.
+ desired, which will be created if need be.
+
+ `text` is the content to create in the file, a native string (bytes in
+ Python 2, unicode in Python 3).
+
+ If `newline` is provided, it is a string that will be used as the line
+ endings in the created file, otherwise the line endings are as provided
+ in `text`.
Returns `filename`.