From 8f0cd0a242614134557bb999d8f5c4edf21fe7ac Mon Sep 17 00:00:00 2001 From: Adar Nimrod <nimrod@shore.co.il> Date: Sun, 15 Aug 2021 11:46:50 +0300 Subject: [PATCH] Fix readfile tests on Python2. On Python2, write doesn't return anything. Discard the output for compatabilities sake. --- template/functions.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/template/functions.py b/template/functions.py index 3d31471..5a834ed 100644 --- a/template/functions.py +++ b/template/functions.py @@ -49,8 +49,7 @@ def readfile(path): '' >>> foo = "foo" >>> with open("/tmp/foo", "w") as f: - ... f.write(foo) - 3 + ... _ = f.write(foo) >>> foo == readfile("/tmp/foo") True """ -- GitLab