summaryrefslogtreecommitdiff
path: root/tests/weakref_test.py
blob: 117ba946c22b586952835cf6b742e42bc03c1a81 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#! /usr/bin/env python
# -*- coding: utf-8 -*-
# vi:ts=4:et

import unittest
import weakref
import pycurl

class WeakrefTest(unittest.TestCase):
    def test_easy(self):
        c = pycurl.Curl()
        weakref.ref(c)
        c.close()
    
    def test_multi(self):
        m = pycurl.CurlMulti()
        weakref.ref(m)
        m.close()
    
    def test_share(self):
        s = pycurl.CurlShare()
        weakref.ref(s)
        s.close()