From 57d62f4361822a2f8cbc9635427e4afc2fb503f5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 28 Dec 2007 16:55:45 -0600 Subject: r26625: Wrap some more events functions for Python and add a trivial test for it. (This used to be commit 7873666a958a0b92c979dba93f3c3e5136e28d29) --- source4/lib/events/tests.py | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 source4/lib/events/tests.py (limited to 'source4/lib/events/tests.py') 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 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 . +# + +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()) -- cgit From 6b3e2c308ac4fb97a89e84b58136efc842ed4f0f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 22 May 2008 01:17:30 +0200 Subject: Fix events test. (This used to be commit 0fae6f11081cff7846319175cfec95fa3911571c) --- source4/lib/events/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/lib/events/tests.py') diff --git a/source4/lib/events/tests.py b/source4/lib/events/tests.py index b14f7e6250..006426207e 100644 --- a/source4/lib/events/tests.py +++ b/source4/lib/events/tests.py @@ -17,7 +17,7 @@ # along with this program. If not, see . # -import events +from samba import events import unittest # Just test the bindings are there and that calling them doesn't crash -- cgit