Exemplo n.º 1
0
 def test_nested(self):
     job1 = self.project.open_job({'a': 0, 'b': {'c': True, 'd': 11}})
     job2 = self.project.open_job({'a': 0, 'b': {'c': True, 'd': 4}})
     expected = {
         str(job1.id): {
             'b': {
                 'd': 11
             }
         },
         str(job2.id): {
             'b': {
                 'd': 4
             }
         }
     }
     result = signac.diff_jobs(job1, job2)
     assert expected == result, '{} is not {}'.format(result, expected)
Exemplo n.º 2
0
 def test_nested(self):
     job1 = self.project.open_job({"a": 0, "b": {"c": True, "d": 11}})
     job2 = self.project.open_job({"a": 0, "b": {"c": True, "d": 4}})
     expected = {
         str(job1.id): {
             "b": {
                 "d": 11
             }
         },
         str(job2.id): {
             "b": {
                 "d": 4
             }
         }
     }
     result = signac.diff_jobs(job1, job2)
     assert expected == result, f"{result} is not {expected}"
Exemplo n.º 3
0
 def test_same_job(self):
     job1 = self.project.open_job({'a': 0, 'b': 1})
     expected = {str(job1.id): {}}
     result = signac.diff_jobs(job1, job1)
     assert expected == result, '{} is not {}'.format(result, expected)
Exemplo n.º 4
0
 def test_no_jobs(self):
     assert signac.diff_jobs() == {}
Exemplo n.º 5
0
 def test_same_job(self):
     job1 = self.project.open_job({"a": 0, "b": 1})
     expected = {str(job1.id): {}}
     result = signac.diff_jobs(job1, job1)
     assert expected == result, f"{result} is not {expected}"