def test_testrun_id_invalid(self): with pytest.raises(Dump2PolarionException) as excinfo: ostriztools._get_testrun_id("INVALID") assert "InvalidVersion parsing testrun ID" in str(excinfo.value)
def test_testrun_id_build(self): testrun_id = ostriztools._get_testrun_id("5.8.0.17-20170525183055_6317a22") assert testrun_id == "5_8_0_17"
def test_testrun_id_nofill(self): testrun_id = ostriztools._get_testrun_id("5.8.0.7-2017") assert testrun_id == "5_8_0_7"
def test_testrun_id_simple(self): testrun_id = ostriztools._get_testrun_id("5.8.0.17") assert testrun_id == "5_8_0_17"