Beispiel #1
0
    def test_overwrite_hash(self):
        path = Path('out', hash_overwrite='foo')
        self.assertEqual(path._sis_hash(),
                         b"(Path, (tuple, (NoneType), (str, 'foo')))")

        mjob = MockJob('test/me.1234')
        path = Path('lm.gz', mjob, hash_overwrite=('foo', 'bar'))
        self.assertEqual(path._sis_hash(),
                         b"(Path, (tuple, (str, 'foo'), (str, 'bar')))")
Beispiel #2
0
    def test_hash(self):
        path = Path('out')
        self.assertEqual(path._sis_hash(),
                         b"(Path, (tuple, (NoneType), (str, 'out')))")

        mjob = MockJob('test/me.1234')
        path = Path('lm.gz', mjob)
        self.assertEqual(
            path._sis_hash(), b"(Path, (tuple, (MockJob, (dict, (tuple, "
            b"(str, 'path'), (str, 'test/me.1234')))), "
            b"(str, 'lm.gz')))")