MCPcopy Index your code
hub / github.com/bugy/script-server / test

Method test

src/tests/process_popen_test.py:46–58  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

44
45class TestExecution(unittest.TestCase):
46 def test(self):
47 file_path = os.path.join(test_utils.temp_folder, 'test.txt')
48 file_utils.write_file(file_path,
49 b'g\xc3\xbcltig\n l\xc3\xa4uft ver\xc3\xa4ndert f\xc3\xbcr '
50 b'\xc4ndern \nPr\xfcfung g\xc3\xbcltig l\xc3\xa4uft \xe0\xa0\x80 \xf0\x92\x80\x80!',
51 byte_content=True)
52
53 process_wrapper = POpenProcessWrapper(['cat', 'test.txt'], test_utils.temp_folder, {})
54 process_wrapper.start()
55
56 output = test_utils.wait_and_read(process_wrapper)
57
58 self.assertEqual('gültig\n läuft verändert für �ndern \nPr�fung gültig läuft ࠀ 𒀀!', output)
59
60
61class TestPrepareForWindows(unittest.TestCase):

Callers 3

isFullRegexMatchFunction · 0.80
ReactiveWebSocketFunction · 0.80

Calls 2

POpenProcessWrapperClass · 0.90
startMethod · 0.45

Tested by

no test coverage detected