示例#1
0
 def save(self, saveloc='.', refs=None, overwrite=True):
     return GnomeId.save(self,
                         saveloc=saveloc,
                         refs=refs,
                         overwrite=overwrite)
示例#2
0
def test_deepcopy():
    go = GnomeId()
    go_c = copy.deepcopy(go)
    assert go.id != go_c.id
    assert go is not go_c
示例#3
0
 def _attach_default_refs(self, ref_dict):
     for i in self.initializers:
         i._attach_default_refs(ref_dict)
     return GnomeId._attach_default_refs(self, ref_dict)
示例#4
0
def test_exceptions():
    with pytest.raises(AttributeError):
        go = GnomeId()
        print '\n id exists: {0}'.format(go.id)  # calls getter, assigns an id
        go.id = uuid1()
def test_exceptions():
    with pytest.raises(AttributeError):
        go = GnomeId()
        print '\n id exists: {0}'.format(go.id)  # calls getter, assigns an id
        go.id = uuid1()