Opened 7 years ago

Closed 7 years ago

#2622 closed defect (fixed)

python3.3 and config_data_test.py failures

Reported by: jreed Owned by: muks
Priority: medium Milestone: Sprint-20130205
Component: tests Version:
Keywords: Cc:
CVSS Scoring: Parent Tickets:
Sensitive: no Defect Severity: N/A
Sub-Project: Core Feature Depending on Ticket:
Estimated Difficulty: 3 Add Hours to Ticket: 0
Total Hours: 0 Internal?: no

Description

Using python 3.3.0:

Running test: config_data_test.py
..................F........F..../home/b10builder/builder/work/BIND10-valgrind/20130110133225-CentOS5-x86_64-GCC/build/src/lib/python/isc/config/tests/config_data_test.py:363: DeprecationWarning: Please use assertTrue instead.
  self.assert_(module_spec.get_module_name() in self.mcd._specifications)
/home/b10builder/builder/work/BIND10-valgrind/20130110133225-CentOS5-x86_64-GCC/build/src/lib/python/isc/config/tests/config_data_test.py:364: DeprecationWarning: Please use assertEqual instead.
  self.assertEquals(module_spec, self.mcd._specifications[module_spec.get_module_name()])
...
======================================================================
FAIL: test_get_config_item_list_named_set (__main__.TestMultiConfigData)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/b10builder/builder/work/BIND10-valgrind/20130110133225-CentOS5-x86_64-GCC/build/src/lib/python/isc/config/tests/config_data_test.py", line 835, in test_get_config_item_list_named_set
    ], config_items)
AssertionError: Lists differ: ['Spec32/named_set_item/aaaa',... != ['Spec32/named_set_item/aaaa',...

First differing element 1:
Spec32/named_set_item/aabb
Spec32/named_set_item/bbbb

  ['Spec32/named_set_item/aaaa',
-  'Spec32/named_set_item/aabb',
-  'Spec32/named_set_item/bbbb']
?                              ^

+  'Spec32/named_set_item/bbbb',
?                              ^

+  'Spec32/named_set_item/aabb']

======================================================================
FAIL: test_get_value_maps_named_set (__main__.TestMultiConfigData)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/b10builder/builder/work/BIND10-valgrind/20130110133225-CentOS5-x86_64-GCC/build/src/lib/python/isc/config/tests/config_data_test.py", line 701, in test_get_value_maps_named_set
    'value': 2, 'modified': False}], maps)
AssertionError: Lists differ: [{'name': 'Spec32/named_set_it... != [{'name': 'Spec32/named_set_it...

First differing element 0:
{'name': 'Spec32/named_set_item/a', 'modified': False, 'default': True, 'type': 'integer', 'value': 1}
{'name': 'Spec32/named_set_item/b', 'modified': False, 'default': True, 'type': 'integer', 'value': 2}

  [{'default': True,
+   'modified': False,
+   'name': 'Spec32/named_set_item/b',
+   'type': 'integer',
+   'value': 2},
+  {'default': True,
    'modified': False,
    'name': 'Spec32/named_set_item/a',
    'type': 'integer',
-   'value': 1},
?              ^

+   'value': 1}]
?
-  {'default': True,
-   'modified': False,
-   'name': 'Spec32/named_set_item/b',
-   'type': 'integer',
-   'value': 2}]

----------------------------------------------------------------------
Ran 35 tests in 0.072s

FAILED (failures=2)
make[8]: *** [check-local] Error 1
make[8]: Leaving directory `/home/b10builder/builder/work/BIND10-valgrind/20130110133225-CentOS5-x86_64-GCC/build/src/lib/python/isc/config/tests'

Subtickets

Attachments (2)

Change History (9)

comment:1 Changed 7 years ago by jwright

  • Component changed from configuration to tests
  • Milestone changed from New Tasks to Next-Sprint-Proposed

comment:2 Changed 7 years ago by muks

  • Owner set to muks
  • Status changed from new to assigned

I have got a patch for this and will attach it shortly. I have upgraded to Fedora 18 over this weekend, which has Python 3.3.

comment:3 Changed 7 years ago by jelte

  • Milestone changed from Next-Sprint-Proposed to Sprint-20130205

comment:4 Changed 7 years ago by muks

  • Owner changed from muks to UnAssigned
  • Status changed from assigned to reviewing

This is ready for review.

comment:5 Changed 7 years ago by jelte

  • Owner changed from UnAssigned to jelte

comment:6 Changed 7 years ago by jelte

  • Owner changed from jelte to muks

Looks good, and works with my python3.3

comment:7 Changed 7 years ago by muks

  • Resolution set to fixed
  • Status changed from reviewing to closed

Merged to master branch in commit 8f2bbf55feb66a26d6b2c416fd902f488f9848ac:

* 4a7f643 [2622] Fix test failures in config_data_test.py under Python 3.3
* ac808e9 [2622] Stop using deprecated syntax for assertions

Resolving as fixed. Thank you for the review Jelte.

Note: See TracTickets for help on using tickets.