You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
assignee='https://github.com/voidspace'closed_at=<Date2013-03-19.00:50:25.884>created_at=<Date2012-12-18.02:28:57.191>labels= ['easy', 'type-feature', 'library']
title='unittest discover order is filesystem specific - hard to reproduce'updated_at=<Date2013-03-19.00:50:25.882>user='https://github.com/rbtcollins'
Openstack recently switched from nose to using discover. discover walks the filesystem using os.listdir(), and that is just a thin layer over readdir. On ext3/ext4 filesystems, readdir is in an arbitrary order dependent on file insertion into the directory if dir_index is enabled (which is the default).
This means that files are loaded in an order that isn't reproducable by other developers, so bad tests that have isolation issues can be very tricky to track down.
Just wrapping the os.listdir() in sorted() would be sufficient to make this robust and repeatable, and avoid the headache.