pchealthstream2py.tests.simple_test

Simple tests

pchealthstream2py.tests.simple_test.test_readers_do_not_share_state()[source]

Two readers must not share their queue and stop flag.

Regression test: these used to be class attributes, so opening a second reader cleared the first one’s buffer and closing either stopped both.

pchealthstream2py.tests.simple_test.test_stop_does_not_shadow_thread_internals()[source]

Thread._stop must stay the method CPython calls internally.

Regression test: the stop flag used to be named _stop, shadowing threading.Thread._stop, which made join() raise “TypeError: ‘Event’ object is not callable” and left is_alive() stuck on True after the worker had finished.