diff options
author | skalsin <skalsin@yandex-team.ru> | 2022-02-10 16:46:38 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:46:38 +0300 |
commit | 0ec5f3106fcb5e342ec13cdfad678bf4633580d5 (patch) | |
tree | 201e92c5c9e5d0123fc5f7be509649e36596dd0b /util/digest | |
parent | a693106aae8a3a3c7236a4ae953058a9611d7a92 (diff) | |
download | ydb-0ec5f3106fcb5e342ec13cdfad678bf4633580d5.tar.gz |
Restoring authorship annotation for <skalsin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/digest')
-rw-r--r-- | util/digest/multi.pxd | 4 | ||||
-rw-r--r-- | util/digest/multi_ut.pyx | 32 |
2 files changed, 18 insertions, 18 deletions
diff --git a/util/digest/multi.pxd b/util/digest/multi.pxd index 8b4fae5016..cc8348cc75 100644 --- a/util/digest/multi.pxd +++ b/util/digest/multi.pxd @@ -1,2 +1,2 @@ -cdef extern from "<util/digest/multi.h>" nogil: - size_t MultiHash(...); +cdef extern from "<util/digest/multi.h>" nogil: + size_t MultiHash(...); diff --git a/util/digest/multi_ut.pyx b/util/digest/multi_ut.pyx index 26faa0069b..7716e61712 100644 --- a/util/digest/multi_ut.pyx +++ b/util/digest/multi_ut.pyx @@ -1,19 +1,19 @@ -from util.digest.multi cimport MultiHash +from util.digest.multi cimport MultiHash from util.generic.string cimport TString - -import pytest -import unittest - - -class TestMultiHash(unittest.TestCase): - - def test_str_int(self): + +import pytest +import unittest + + +class TestMultiHash(unittest.TestCase): + + def test_str_int(self): value = MultiHash(TString(b"1234567"), 123) - self.assertEquals(value, 17038203285960021630) - - def test_int_str(self): + self.assertEquals(value, 17038203285960021630) + + def test_int_str(self): value = MultiHash(123, TString(b"1234567")) - self.assertEquals(value, 9973288649881090712) - - def test_collision(self): - self.assertNotEquals(MultiHash(1, 1, 0), MultiHash(2, 2, 0)) + self.assertEquals(value, 9973288649881090712) + + def test_collision(self): + self.assertNotEquals(MultiHash(1, 1, 0), MultiHash(2, 2, 0)) |