diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2022-09-11 18:45:22 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-09-11 17:45:22 -0500 |
| commit | 30114c6ea9b8fca98d88bfe90aa2f39b6182820d (patch) | |
| tree | fd97162b5810765a72b81e9fe36a486cdfc39c84 /tests/test_rust_utils.py | |
| parent | d480268f294701a4897d0c82a468bc8f16c5dd10 (diff) | |
| download | cryptography-30114c6ea9b8fca98d88bfe90aa2f39b6182820d.tar.gz | |
Remove destroy from FixedPool (#7602)
turns out we don't need it
Diffstat (limited to 'tests/test_rust_utils.py')
| -rw-r--r-- | tests/test_rust_utils.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/tests/test_rust_utils.py b/tests/test_rust_utils.py index 99ddfb01a..1ee68541e 100644 --- a/tests/test_rust_utils.py +++ b/tests/test_rust_utils.py @@ -19,10 +19,7 @@ class TestFixedPool: events.append(("create", c)) return c - def destroy(c): - events.append(("destroy", c)) - - pool = FixedPool(create, destroy) + pool = FixedPool(create) assert events == [("create", 1)] with pool.acquire() as c: assert c == 1 @@ -32,9 +29,9 @@ class TestFixedPool: assert c == 2 assert events == [("create", 1), ("create", 2)] - assert events == [("create", 1), ("create", 2), ("destroy", 2)] + assert events == [("create", 1), ("create", 2)] - assert events == [("create", 1), ("create", 2), ("destroy", 2)] + assert events == [("create", 1), ("create", 2)] del pool gc.collect() @@ -44,18 +41,13 @@ class TestFixedPool: assert events == [ ("create", 1), ("create", 2), - ("destroy", 2), - ("destroy", 1), ] def test_thread_stress(self): def create(): return None - def destroy(c): - pass - - pool = FixedPool(create, destroy) + pool = FixedPool(create) def thread_fn(): with pool.acquire(): |
