Exemple #1
0
    def test_default_id_different_requires(self, task):
        t1 = floto.specs.task.Task(id_='t1')
        t2 = floto.specs.task.Task(id_='t2')

        task.requires = [t1.id_]
        id_1 = task._default_id(domain='d', name='n', version='v', input='i')

        task.requires = [t2.id_]
        id_2 = task._default_id(domain='d', name='n', version='v', input='i')
        assert not id_1 == id_2 
Exemple #2
0
    def test_default_id_different_requires(self, task):
        t1 = floto.specs.task.Task(id_='t1')
        t2 = floto.specs.task.Task(id_='t2')

        task.requires = [t1.id_]
        id_1 = task._default_id(domain='d', name='n', version='v', input='i')

        task.requires = [t2.id_]
        id_2 = task._default_id(domain='d', name='n', version='v', input='i')
        assert not id_1 == id_2
Exemple #3
0
 def test_default_id_same_input(self, task):
     input_1 = {'foo': 'bar', 'foo2': 'bar'}
     input_2 = {'foo2': 'bar', 'foo': 'bar'}
     id1 = task._default_id(domain='d',
                            name='n',
                            version='v',
                            input=input_1)
     id2 = task._default_id(domain='d',
                            name='n',
                            version='v',
                            input=input_2)
     assert id1 == id2
Exemple #4
0
 def test_default_id_different_input(self, task):
     id1 = task._default_id(domain='d', name='n', version='v', input='i1') 
     id2 = task._default_id(domain='d', name='n', version='v', input='i2')
     assert not id1 == id2
Exemple #5
0
 def test_default_id_same_input(self, task):
     input_1 = {'foo':'bar', 'foo2':'bar'}
     input_2 = {'foo2':'bar', 'foo':'bar'}
     id1 = task._default_id(domain='d', name='n', version='v', input=input_1) 
     id2 = task._default_id(domain='d', name='n', version='v', input=input_2)
     assert id1 == id2
Exemple #6
0
 def test_default_id_format(self, task):
     assert 'n:v:' in task._default_id(domain='d', name='n', version='v', input=None)
Exemple #7
0
 def test_default_id_different_input(self, task):
     id1 = task._default_id(domain='d', name='n', version='v', input='i1')
     id2 = task._default_id(domain='d', name='n', version='v', input='i2')
     assert not id1 == id2
Exemple #8
0
 def test_default_id_format(self, task):
     assert 'n:v:' in task._default_id(domain='d',
                                       name='n',
                                       version='v',
                                       input=None)