fix trait test to only work when traits are supported