ÿØÿàJFIFÿþ ÿÛC       ÿÛC ÿÀÿÄÿÄ"#QrÿÄÿÄ&1!A"2qQaáÿÚ ?Øy,æ/3JæÝ¹È߲؋5êXw²±ÉyˆR”¾I0ó2—PI¾IÌÚiMö¯–þrìN&"KgX:Šíµ•nTJnLK„…@!‰-ý ùúmë;ºgµŒ&ó±hw’¯Õ@”Ü— 9ñ-ë.²1<yà‚¹ïQÐU„ہ?.’¦èûbß±©Ö«Âw*VŒ) `$‰bØÔŸ’ëXÖ-ËTÜíGÚ3ð«g Ÿ§¯—Jx„–’U/ÂÅv_s(Hÿ@TñJÑãõçn­‚!ÈgfbÓc­:él[ðQe 9ÀPLbÃãCµm[5¿ç'ªjglå‡Ûí_§Úõl-;"PkÞÞÁQâ¼_Ñ^¢SŸx?"¸¦ùY騐ÒOÈ q’`~~ÚtËU¹CڒêV  I1Áß_ÿÙfrom __future__ import print_function import select import contextlib import errno from systemd import login import pytest @contextlib.contextmanager def skip_oserror(code): try: yield except (OSError, IOError) as e: if e.errno == code: pytest.skip() raise def test_seats(): # just check that we get some sequence back with skip_oserror(errno.ENOENT): seats = login.seats() assert len(seats) >= 0 def test_sessions(): with skip_oserror(errno.ENOENT): sessions = login.sessions() assert len(sessions) >= 0 def test_machine_names(): with skip_oserror(errno.ENOENT): machine_names = login.machine_names() assert len(machine_names) >= 0 def test_uids(): with skip_oserror(errno.ENOENT): uids = login.uids() assert len(uids) >= 0 def test_monitor(): p = select.poll() with skip_oserror(errno.ENOENT): m = login.Monitor("machine") p.register(m, m.get_events()) login.machine_names() p.poll(1) login.machine_names()