New submission from Barry A. Warsaw <ba...@python.org>:

The check_node() function in test_uuid.py uses the wrong bitmask, causing the 
tests to fail on valid MAC addresses.  Also, the description in the comment is 
incorrect.  From my reading of the wikipedia page, the test is trying to ensure 
that the MAC address is "universally administered", which is designated by a 
zero value in "the second least significant digit of the first octet".

Thus the bitmask value *and* the comment are both wrong AFAICT, given that the 
original value is:

% ./python.exe -c "from math import log2; print(log2(0x010000000000))"
40.0

I have a fix that passes on my machine, so I'll PR that and see if it passes on 
CI.

----------
assignee: barry
components: Tests
messages: 306672
nosy: barry
priority: normal
severity: normal
status: open
title: test_uuid uses the incorrect bitmask
versions: Python 3.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue32107>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to