cornell-brg / pymtl

Python-based hardware modeling framework
BSD 3-Clause "New" or "Revised" License
237 stars 82 forks source link

The order of test matters. I think this is a bug #157

Open jsn1993 opened 8 years ago

jsn1993 commented 8 years ago

When I use py.test -n 2 option I found that there is some test case failing on travis CI but previously not locally. I reproduced it locally by swapping the order of some tests.

Basically if we swap those two tests, it will fail because these two share the same hash value. https://github.com/cornell-brg/pymtl/blob/master/pymtl/tools/simulation/SimulationTool_struct_test.py#L784 and https://github.com/cornell-brg/pymtl/blob/master/pymtl/tools/simulation/SimulationTool_struct_test.py#L793

If it's not a bug which means these two have to be tested in a certain order, then xdist -n 2 option may not be applicable to this case.