def test_set_spe(self): for spid in GOOD: pid = Pid(spid) t, p, e = 1, 'foo', 'bar' pid.target = t pid.product = p pid.extension = e expected = '%s_%05d_%s.%s' % (spid, t, p, e) assert pid.pid == expected
def test_set_target(self): for spid in GOOD: pid, target = Pid(spid), 7 pid.target = target assert pid.pid == '%s_%05d' % (spid, target)