def test_with_then_without(): with get_socket() as sock: s1 = Service("A", sock=sock) s1._setup() s2 = Service("B", sock=sock) s2._setup() s0 = Service("", sock=sock) s0._setup()
def main(): tf = Test("foo") tb = Test("bar") Service.loop()