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_product(self): for spid in GOOD: pid, product = Pid(spid), 'foo' pid.product = product assert pid.pid == '%s_%s' % (spid, product)