From 7e065faf32d3491ca98e5bbfdc0045444696fa4d Mon Sep 17 00:00:00 2001 From: Hynek Schlawack Date: Wed, 15 Dec 2021 08:27:49 +0100 Subject: [PATCH] Add test for attrs.astuple --- tests/test_next_gen.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test_next_gen.py b/tests/test_next_gen.py index 98764d1f1..733ef3b76 100644 --- a/tests/test_next_gen.py +++ b/tests/test_next_gen.py @@ -368,3 +368,13 @@ class D(B, C): d = D() assert d.x == d.xx() + + +class TestAsTuple: + def test_smoke(self): + """ + `attrs.astuple` only changes defaults, so we just call it and compare. + """ + inst = C("foo", 42) + + assert attrs.astuple(inst) == _attr.astuple(inst)