diff --git a/tests/test_encode.py b/tests/test_encode.py
index <HASH>..<HASH> 100644
--- a/tests/test_encode.py
+++ b/tests/test_encode.py
@@ -39,6 +39,16 @@ def test_encode_dict():
     assert bencode(od) == b'd2:ka2:va2:kbi2ee'
 
 
+def test_encode_dict_subclass():
+    class AAA(dict):
+        pass
+
+    od = dict()
+    od['ka'] = 'va'
+    od['kb'] = 2
+    assert bencode(od) == b'd2:ka2:va2:kbi2ee'
+
+
 def test_encode_complex():
     od = dict()
     od['KeyA'] = ['listitemA', {'k': 'v'}, 3]
Add tests for encoding subclasses of dict