Revision 0f85ebd9
b/test/ganeti.asyncnotifier_unittest.py | ||
---|---|---|
1 | 1 |
#!/usr/bin/python |
2 | 2 |
# |
3 | 3 |
|
4 |
# Copyright (C) 2010 Google Inc. |
|
4 |
# Copyright (C) 2010, 2012 Google Inc.
|
|
5 | 5 |
# |
6 | 6 |
# This program is free software; you can redistribute it and/or modify |
7 | 7 |
# it under the terms of the GNU General Public License as published by |
... | ... | |
73 | 73 |
# TERM notifier is enabled by default, as we use it to get out of the loop |
74 | 74 |
self.ihandler[self.NOTIFIER_TERM].enable() |
75 | 75 |
|
76 |
def tearDown(self): |
|
77 |
# disable the inotifiers, before removing the files |
|
78 |
for i in self.ihandler: |
|
79 |
i.disable() |
|
80 |
testutils.GanetiTestCase.tearDown(self) |
|
81 |
# and unregister the fd's being polled |
|
82 |
for n in self.notifiers: |
|
83 |
n.del_channel() |
|
84 |
|
|
76 | 85 |
class OnInotifyCallback: |
77 | 86 |
def __init__(self, testobj, i): |
78 | 87 |
self.testobj = testobj |
Also available in: Unified diff