Clean up debug statements

This commit is contained in:
Aaron Lichtman 2019-11-16 14:52:19 +01:00
parent 5d75bc25c7
commit b1c7deb9b9
No known key found for this signature in database
GPG key ID: 22368077DE9F9903

View file

@ -73,16 +73,13 @@ def open_editor_and_enter(context, text=""):
text = (text or context.text) text = (text or context.text)
print("open_editor_and_enter called") print("open_editor_and_enter called")
def _mock_editor_function(command): def _mock_editor_function(command):
print("_mock_editor_function called")
tmpfile = command[-1] tmpfile = command[-1]
print("TMPFILE:", tmpfile)
with open(tmpfile, "w+") as f: with open(tmpfile, "w+") as f:
if text is not None: if text is not None:
f.write(text) f.write(text)
else: else:
f.write("") f.write("")
print("File contents:", open(tmpfile, "r").read())
return tmpfile return tmpfile
with patch('subprocess.call', side_effect=_mock_editor_function): with patch('subprocess.call', side_effect=_mock_editor_function):