Example #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 
Example #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
Example #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
Example #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
Example #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
Example #6
0
 def test_default_id_format(self, task):
     assert 'n:v:' in task._default_id(domain='d', name='n', version='v', input=None)
Example #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
Example #8
0
 def test_default_id_format(self, task):
     assert 'n:v:' in task._default_id(domain='d',
                                       name='n',
                                       version='v',
                                       input=None)