Change in vdsm[master]: network: add hosttail_join to address.py

edwardh at redhat.com edwardh at redhat.com
Thu Mar 31 12:15:17 UTC 2016


Edward Haas has posted comments on this change.

Change subject: network: add hosttail_join to address.py
......................................................................


Patch Set 2:

(1 comment)

https://gerrit.ovirt.org/#/c/55473/1/tests/common/network_test.py
File tests/common/network_test.py:

Line 67:     def test_hosttail_ipv6_no_brackets_returns_garbage(self):
Line 68:         self.assertNotEqual(('2001::1', '4321'),
Line 69:                             ipaddress.hosttail_split('2001::1:4321'))
Line 70: 
Line 71:     @permutations([
> IMHO, permutations are readable, clear and were meant exactly for these kin
Your explanation of the input is precisely what I am missing when permutations are overused.
A test should express what it tests, beyond the specific input provided. An input represents a subset of what was intended to test, the fact that the permutations are missing a label that describes that, I find them in many cases overused.
The intent in tests are also used as documentation.

If you insist leaving it like this, at least please add comments describing what each permutation is aimed to test (i.e. naming it, like 'illegal host name as ipv6').
Line 72:         # (host, tail, expected)
Line 73:         ("server", "/", "server:/"),
Line 74:         ("server", "/path", "server:/path"),
Line 75:         ("ser:ver", "/path", "[ser:ver]:/path"),


-- 
To view, visit https://gerrit.ovirt.org/55473
To unsubscribe, visit https://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ic0b778445117090072d64c89ccfd94aaf3c12fa3
Gerrit-PatchSet: 2
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Allon Mureinik <amureini at redhat.com>
Gerrit-Reviewer: Dan Kenigsberg <danken at redhat.com>
Gerrit-Reviewer: Edward Haas <edwardh at redhat.com>
Gerrit-Reviewer: Freddy Rolland <frolland at redhat.com>
Gerrit-Reviewer: Idan Shaby <ishaby at redhat.com>
Gerrit-Reviewer: Jenkins CI
Gerrit-Reviewer: Nir Soffer <nsoffer at redhat.com>
Gerrit-Reviewer: Tal Nisan <tnisan at redhat.com>
Gerrit-Reviewer: gerrit-hooks <automation at ovirt.org>
Gerrit-HasComments: Yes


More information about the vdsm-patches mailing list