diff options
| author | 2022-06-05 00:34:01 -0400 | |
|---|---|---|
| committer | 2022-06-05 00:34:01 -0400 | |
| commit | 548bb979c42f87d6a7be13bd107cf7ec1d937eeb (patch) | |
| tree | 6d6f089141e7abbf22becf9ff5000cc6c37d9e35 /test | |
| parent | 211bbfcd87587d827b54f083870c7bf53211f3b0 (diff) | |
| parent | 25442ea49f031d4d2df3353dd7e9ad2080e332da (diff) | |
Update upstream source from tag 'upstream/1.22.1'
Update to upstream version '1.22.1'
with Debian dir 9c0ed00e4093679e84971427214a2b6e5f55bbb6
Diffstat (limited to 'test')
| -rw-r--r-- | test/test_postprocessor.py | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/test_postprocessor.py b/test/test_postprocessor.py index e23cfa2..c382c0e 100644 --- a/test/test_postprocessor.py +++ b/test/test_postprocessor.py @@ -329,12 +329,22 @@ class MetadataTest(BasePostprocessorTest): path = self.pathfmt.realdirectory + "test_file__meta_.data" m.assert_called_once_with(path, "w", encoding="utf-8") + def test_metadata_stdout(self): + self._create({"filename": "-", "indent": None}) + + with patch("sys.stdout", Mock()) as m: + self._trigger() + + self.assertEqual(self._output(m), """\ +{"category": "test", "extension": "ext", "filename": "file"} +""") + @staticmethod def _output(mock): return "".join( call[1][0] for call in mock.mock_calls - if call[0] == "().write" + if call[0].endswith("write") ) |
