示例#1
0
    def test_unregister(self):
        @API.register
        def dummy():
            pass

        API.unregister(dummy)
        assert dummy not in API.CMDS
示例#2
0
    def test_register(self):
        @API.register
        def dummy():
            pass

        assert dummy in API.CMDS
        API.unregister(dummy)
示例#3
0
    def test_unregister_unexisting(self):
        def dummy():
            pass

        API.unregister(dummy)
        assert dummy not in API.CMDS