From f8aeaee83f1591b3bc524f8880c858f18da4a2fd Mon Sep 17 00:00:00 2001 From: Ned Batchelder Date: Thu, 22 Jan 2015 23:31:41 -0500 Subject: Clarify how to use make_file for non-ascii content. --- coverage/test_helpers.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'coverage/test_helpers.py') diff --git a/coverage/test_helpers.py b/coverage/test_helpers.py index 665593a2..b49e75d8 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`. -- cgit v1.2.1