How to use the flaky.multiprocess_string_io.MultiprocessingStringIO function in flaky

To help you get started, we’ve selected a few flaky examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github box / flaky / test / test_multiprocess_string_io.py View on Github external
def setUp(self):
        super(TestMultiprocessStringIO, self).setUp()
        from flaky.multiprocess_string_io import MultiprocessingStringIO
        self._string_io = StringIO()
        self._mp_string_io = MultiprocessingStringIO()
        del self._mp_string_io.proxy[:]
        self._string_ios = (self._string_io, self._mp_string_io)
github box / flaky / flaky / flaky_nose_plugin.py View on Github external
If this nose run is going to use the multiprocess plugin, then use
        a multiprocess-list backed StringIO proxy; otherwise, use the default
        stream.

        :param multiprocess:
            Whether or not this test run is configured for multiprocessing.
        :type multiprocess:
            `bool`
        :return:
            The stream to use for storing the flaky report.
        :rtype:
            :class:`StringIO` or :class:`MultiprocessingStringIO`
        """
        if multiprocess:
            from flaky.multiprocess_string_io import MultiprocessingStringIO
            return MultiprocessingStringIO()
        return self._stream