diff options
author | bur3 <bur3@yandex-team.ru> | 2022-02-10 16:52:04 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:52:04 +0300 |
commit | 99d815c929689c4f9f772dbe1a671240e9bdfea1 (patch) | |
tree | ab7fbbf3253d4c0e2793218f09378908beb025fb /util | |
parent | 21d4894ec358934fd085d6ed0a177bf19aee27cc (diff) | |
download | ydb-99d815c929689c4f9f772dbe1a671240e9bdfea1.tar.gz |
Restoring authorship annotation for <bur3@yandex-team.ru>. Commit 2 of 2.
Diffstat (limited to 'util')
-rw-r--r-- | util/string/cast.pxd | 4 | ||||
-rw-r--r-- | util/string/cast_ut.pyx | 10 | ||||
-rw-r--r-- | util/tests/cython/test_generic.py | 4 |
3 files changed, 9 insertions, 9 deletions
diff --git a/util/string/cast.pxd b/util/string/cast.pxd index 8d84fb16ae..dc23619e1e 100644 --- a/util/string/cast.pxd +++ b/util/string/cast.pxd @@ -3,8 +3,8 @@ from util.generic.string cimport TString from libcpp cimport bool as bool_t cdef extern from "<util/string/cast.h>" nogil: - T FromString[T](const TString&) except + + T FromString[T](const TString&) except + bool_t TryFromString[T](const TString&, T&) except + TString ToString[T](const T&) except + - + cdef double StrToD(const char* b, char** se) except + diff --git a/util/string/cast_ut.pyx b/util/string/cast_ut.pyx index 0f805a8e19..88e86ef961 100644 --- a/util/string/cast_ut.pyx +++ b/util/string/cast_ut.pyx @@ -1,13 +1,13 @@ # cython: c_string_type=str, c_string_encoding=utf8 -from util.string.cast cimport FromString, ToString +from util.string.cast cimport FromString, ToString import unittest -class TestFromString(unittest.TestCase): - def test_from_int(self): - self.assertEquals(FromString[int]("42"), 42) - +class TestFromString(unittest.TestCase): + def test_from_int(self): + self.assertEquals(FromString[int]("42"), 42) + class TestToString(unittest.TestCase): def test_from_int(self): self.assertEquals(ToString(42), "42") diff --git a/util/tests/cython/test_generic.py b/util/tests/cython/test_generic.py index 79ab6daf82..a0d61339cc 100644 --- a/util/tests/cython/test_generic.py +++ b/util/tests/cython/test_generic.py @@ -10,7 +10,7 @@ from util.generic.maybe_ut import TestMaybe from util.generic.ptr_ut import TestHolder from util.generic.string_ut import TestStroka from util.generic.vector_ut import TestVector -from util.string.cast_ut import TestFromString, TestToString +from util.string.cast_ut import TestFromString, TestToString # Test discovery does not work in cython modules. # Reexporting test classes here to satisfy pylint and pytest. @@ -24,6 +24,6 @@ __all__ = [ 'TestMaybe', 'TestStroka', 'TestVector', - 'TestFromString', + 'TestFromString', 'TestToString', ] |