[test] move out python >= 2.7 specific part
2 files changed