From 27b007b338003f9fa9e8ef381c33fb48362b5032 2021-11-18 15:12:04 From: Nikita Kniazev Date: 2021-11-18 15:12:04 Subject: [PATCH] test_py_script_file_attribute_interactively: Coverage fix --- diff --git a/IPython/core/tests/test_shellapp.py b/IPython/core/tests/test_shellapp.py index f9ea578..32a6aee 100644 --- a/IPython/core/tests/test_shellapp.py +++ b/IPython/core/tests/test_shellapp.py @@ -50,8 +50,4 @@ class TestFileToRun(tt.TempFileMixin, unittest.TestCase): out, err = tt.ipexec(self.fname, options=['-i'], commands=['"__file__" in globals()', 'print(123)', 'exit()']) - if 'False' not in out: - print("Subprocess stderr:") - print(err) - print('-----') - raise AssertionError("'False' not found in %r" % out) + assert "False" in out, f"Subprocess stderr:\n{err}\n-----"