Решение на BiDict от Илия Велев
Обратно към всички решения
Към профила на Илия Велев
Резултати
- 2 точки от тестове
- 0 бонус точки
- 2 точки общо
- 6 успешни тест(а)
- 10 неуспешни тест(а)
Код
Лог от изпълнението
..EE..FEEEEEEE..
======================================================================
ERROR: test_circular_values (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 49, in test_circular_values
circular = self.solutions.BiDict({1: 2, 2: 3, 3: 1})
AttributeError: 'BiDictTestCase' object has no attribute 'solutions'
======================================================================
ERROR: test_copied_circular_values (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 56, in test_copied_circular_values
inversed_circular = circular.copy()
AttributeError: 'BiDict' object has no attribute 'copy'
======================================================================
ERROR: test_hashing_self (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 65, in test_hashing_self
self.assertRaises(TypeError, self.person.update, {'clone': self.person})
AttributeError: 'BiDict' object has no attribute 'update'
======================================================================
ERROR: test_insert_existing_key_with_existing_value (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 74, in test_insert_existing_key_with_existing_value
new_person = self.person.copy()
AttributeError: 'BiDict' object has no attribute 'copy'
======================================================================
ERROR: test_insert_existing_key_with_none_existing_value (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 81, in test_insert_existing_key_with_none_existing_value
new_person = self.person.copy()
AttributeError: 'BiDict' object has no attribute 'copy'
======================================================================
ERROR: test_insert_none_existing_key_with_existing_value (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 88, in test_insert_none_existing_key_with_existing_value
new_person = self.person.copy()
AttributeError: 'BiDict' object has no attribute 'copy'
======================================================================
ERROR: test_insert_none_existing_key_with_none_existing_value (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 95, in test_insert_none_existing_key_with_none_existing_value
new_person = self.person.copy()
AttributeError: 'BiDict' object has no attribute 'copy'
======================================================================
ERROR: test_invalid_value (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 62, in test_invalid_value
self.assertRaises(TypeError, self.person.update, {'sports': ['boxing',]})
AttributeError: 'BiDict' object has no attribute 'update'
======================================================================
ERROR: test_inverse (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 46, in test_inverse
self.assertIn('Кънчо', self.person.keys())
AttributeError: 'BiDict' object has no attribute 'keys'
======================================================================
FAIL: test_has_dict_attrs (__main__.BiDictTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/tmp/test20120627-22085-1inmfr0", line 68, in test_has_dict_attrs
self.assertIn('keys', dir(self.person))
AssertionError: 'keys' not found in ['__class__', '__delattr__', '__delitem__', '__dict__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__getitem__', '__gt__', '__hash__', '__init__', '__iter__', '__le__', '__len__', '__lt__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__setitem__', '__sizeof__', '__str__', '__subclasshook__', '__weakref__', 'dict', 'get', 'inverse']
----------------------------------------------------------------------
Ran 16 tests in 0.003s
FAILED (failures=1, errors=9)
История (1 версия и 0 коментара)
Илия обнови решението на 15.04.2012 15:01 (преди над 12 години)