Created
February 8, 2016 03:13
-
-
Save nward/a931f38c5a8b34b8a1cd to your computer and use it in GitHub Desktop.
Testing a collectd python module
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def config_function(config=None): | |
# do something | |
pass | |
def init_function(): | |
# do something | |
pass | |
if __name__ == '__main__': | |
class CollectdDummy: | |
def register_config(self,a): | |
# do something | |
pass | |
def register_init(self,a): | |
# do something | |
pass | |
def register_read(self,a,b): | |
# do something | |
pass | |
collectd = CollectdDummy() | |
else: | |
import collectd | |
collectd.register_config(config_function) | |
collectd.register_init(init_function) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment