diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2007-12-28 16:55:45 -0600 |
---|---|---|
committer | Stefan Metzmacher <metze@samba.org> | 2007-12-28 11:03:01 -0600 |
commit | 57d62f4361822a2f8cbc9635427e4afc2fb503f5 (patch) | |
tree | e36f97c0f3b35fa03d635ed85b2e3642c2ae3736 /source4/lib/events/tests.py | |
parent | 68b698270481f2b033046dcd6e0a293c1cdaf838 (diff) | |
download | samba-57d62f4361822a2f8cbc9635427e4afc2fb503f5.tar.gz samba-57d62f4361822a2f8cbc9635427e4afc2fb503f5.tar.bz2 samba-57d62f4361822a2f8cbc9635427e4afc2fb503f5.zip |
r26625: Wrap some more events functions for Python and add a trivial test for it.
(This used to be commit 7873666a958a0b92c979dba93f3c3e5136e28d29)
Diffstat (limited to 'source4/lib/events/tests.py')
-rw-r--r-- | source4/lib/events/tests.py | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/source4/lib/events/tests.py b/source4/lib/events/tests.py new file mode 100644 index 0000000000..b14f7e6250 --- /dev/null +++ b/source4/lib/events/tests.py @@ -0,0 +1,31 @@ +#!/usr/bin/python + +# Unix SMB/CIFS implementation. +# Copyright (C) Jelmer Vernooij <jelmer@samba.org> 2007 +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see <http://www.gnu.org/licenses/>. +# + +import events +import unittest + +# Just test the bindings are there and that calling them doesn't crash +# anything. + +class EventTestCase(unittest.TestCase): + def test_create(self): + self.assertTrue(events.event() is not None) + + def test_loop_wait(self): + self.assertEquals(0, events.event().loop_wait()) |