Bläddra i källkod

utils: make git object type of TestObject obvious

In debugging some problems with MissingObjectFinder, I've repeatedly
gotten confused by some error messages that talk about "TestObject has
no attribute X" for varying X. Poking a clearer name into __name__ for
TestObject helps clarify what we're really seeing.
Augie Fackler 11 år sedan
förälder
incheckning
6d1adff335
1 ändrade filer med 1 tillägg och 0 borttagningar
  1. 1 0
      dulwich/tests/utils.py

+ 1 - 0
dulwich/tests/utils.py

@@ -102,6 +102,7 @@ def make_object(cls, **attrs):
         __dict__ instead of __slots__.
         __dict__ instead of __slots__.
         """
         """
         pass
         pass
+    TestObject.__name__ = 'TestObject_' + cls.__name__
 
 
     obj = TestObject()
     obj = TestObject()
     for name, value in attrs.items():
     for name, value in attrs.items():