| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent f4c0d34 commit 35ed73a
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -10,7 +10,9 @@ | |||
| 10 | 10 | ||
| 11 | 11 | ||
| 12 | 12 | class TestExecArgs(unittest.TestCase): | |
| 13 | - @unittest.skip("test broken under pytest") | ||
| 13 | + # These tests are currently not very useful. Under pytest neither stdout nor stdin are ttys, | ||
| 14 | + # hence bpython.args.parse will just exectute code by falling back to Python. | ||
| 15 | + | ||
| 14 | 16 | def test_exec_dunder_file(self): | |
| 15 | 17 | with tempfile.NamedTemporaryFile(mode="w") as f: | |
| 16 | 18 | f.write( | |
@@ -25,7 +27,7 @@ def test_exec_dunder_file(self): | |||
| 25 | 27 | p = subprocess.Popen( | |
| 26 | 28 | [sys.executable] + ["-m", "bpython.curtsies", f.name], | |
| 27 | 29 | stderr=subprocess.PIPE, | |
| 28 | - universal_newlines=True, | ||
| 30 | + text=True, | ||
| 29 | 31 | ) | |
| 30 | 32 | (_, stderr) = p.communicate() | |
| 31 | 33 | ||
@@ -36,7 +38,6 @@ def test_exec_nonascii_file(self): | |||
| 36 | 38 | f.write( | |
| 37 | 39 | dedent( | |
| 38 | 40 | """\ | |
| 39 | - #!/usr/bin/env python | ||
| 40 | 41 | # coding: utf-8 | |
| 41 | 42 | "你好 # nonascii" | |
| 42 | 43 | """ | |
@@ -50,7 +51,6 @@ def test_exec_nonascii_file(self): | |||
| 50 | 51 | except subprocess.CalledProcessError: | |
| 51 | 52 | self.fail("Error running module with nonascii characters") | |
| 52 | 53 | ||
| 53 | - @unittest.skip("test broken under pytest") | ||
| 54 | 54 | def test_exec_nonascii_file_linenums(self): | |
| 55 | 55 | with tempfile.NamedTemporaryFile(mode="w") as f: | |
| 56 | 56 | f.write( | |
@@ -66,7 +66,7 @@ def test_exec_nonascii_file_linenums(self): | |||
| 66 | 66 | p = subprocess.Popen( | |
| 67 | 67 | [sys.executable, "-m", "bpython.curtsies", f.name], | |
| 68 | 68 | stderr=subprocess.PIPE, | |
| 69 | - universal_newlines=True, | ||
| 69 | + text=True, | ||
| 70 | 70 | ) | |
| 71 | 71 | (_, stderr) = p.communicate() | |
| 72 | 72 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments