aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/python/pyasn1/py3/tests/compat/test_integer.py
diff options
context:
space:
mode:
authorrobot-piglet <robot-piglet@yandex-team.com>2024-09-29 14:56:34 +0300
committerrobot-piglet <robot-piglet@yandex-team.com>2024-09-29 15:07:41 +0300
commit879a377a0a58f7bf1b0c55ea8c0f525e33f35b53 (patch)
treee641b8333a1bfaba647b06775c352f4315f26ee5 /contrib/python/pyasn1/py3/tests/compat/test_integer.py
parentd33d1897c75f511aed6d7a35b51fa4647cfd5fd4 (diff)
downloadydb-879a377a0a58f7bf1b0c55ea8c0f525e33f35b53.tar.gz
Intermediate changes
commit_hash:02eb31a2fa9b8a7459367d02598ccdfb6d69f271
Diffstat (limited to 'contrib/python/pyasn1/py3/tests/compat/test_integer.py')
-rw-r--r--contrib/python/pyasn1/py3/tests/compat/test_integer.py49
1 files changed, 0 insertions, 49 deletions
diff --git a/contrib/python/pyasn1/py3/tests/compat/test_integer.py b/contrib/python/pyasn1/py3/tests/compat/test_integer.py
deleted file mode 100644
index 4026b75402d..00000000000
--- a/contrib/python/pyasn1/py3/tests/compat/test_integer.py
+++ /dev/null
@@ -1,49 +0,0 @@
-#
-# This file is part of pyasn1 software.
-#
-# Copyright (c) 2005-2020, Ilya Etingof <etingof@gmail.com>
-# License: https://pyasn1.readthedocs.io/en/latest/license.html
-#
-import sys
-import unittest
-
-from __tests__.base import BaseTestCase
-
-from pyasn1.compat import integer
-
-
-class IntegerTestCase(BaseTestCase):
-
- if sys.version_info[0] > 2:
-
- def test_from_bytes_zero(self):
- assert 0 == integer.from_bytes(bytes([0]), signed=False)
-
- def test_from_bytes_unsigned(self):
- assert -66051 == integer.from_bytes(bytes([254, 253, 253]), signed=True)
-
- def test_from_bytes_signed(self):
- assert 66051 == integer.from_bytes(bytes([0, 1, 2, 3]), signed=False)
-
- def test_from_bytes_empty(self):
- assert 0 == integer.from_bytes(bytes([]))
-
- else:
-
- def test_from_bytes_zero(self):
- assert 0 == integer.from_bytes('\x00', signed=False)
-
- def test_from_bytes_unsigned(self):
- assert -66051 == integer.from_bytes('\xfe\xfd\xfd', signed=True)
-
- def test_from_bytes_signed(self):
- assert 66051 == integer.from_bytes('\x01\x02\x03', signed=False)
-
- def test_from_bytes_empty(self):
- assert 0 == integer.from_bytes('')
-
-
-suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite)