depot/pkgs/by-name/nb/nbmerge/pytest-compatibility.patch
Luke Granger-Brown 57725ef3ec Squashed 'third_party/nixpkgs/' content from commit 76612b17c0ce
git-subtree-dir: third_party/nixpkgs
git-subtree-split: 76612b17c0ce71689921ca12d9ffdc9c23ce40b2
2024-11-10 23:59:47 +00:00

19 lines
553 B
Diff

diff --git a/tests/test_merge.py b/tests/test_merge.py
index 06ee559..9d7b1af 100644
--- a/tests/test_merge.py
+++ b/tests/test_merge.py
@@ -1,3 +1,4 @@
+import io
import os
import sys
import unittest
@@ -21,8 +22,7 @@ def file_names_from(file_paths):
class TestMerge(unittest.TestCase):
def setUp(self):
- if not hasattr(sys.stdout, "getvalue"):
- self.fail("need to run in buffered mode")
+ sys.stdout = io.StringIO()
def _validate_merged_three(self, merged):
self.assertEqual(len(merged.cells), 6)