summaryrefslogtreecommitdiff
path: root/tests/compat/test_binary.py
diff options
context:
space:
mode:
authorJon Dufresne <jon.dufresne@gmail.com>2019-11-16 10:19:07 -0800
committerIlya Etingof <etingof@gmail.com>2019-11-16 19:19:07 +0100
commita7d2ac036866e5f437bd6f9a9f01723f601b4073 (patch)
tree543d918472952d4d7b41ff9ea3ff56fc21b38448 /tests/compat/test_binary.py
parente51d6f520bdd57748f70b8defc2bda1ddea9856b (diff)
downloadpyasn1-git-a7d2ac036866e5f437bd6f9a9f01723f601b4073.tar.gz
Drop support for EOL Pythons (#131)
Python 2.4, 2.5, 2.6, 3.2 and 3.3 are end of life. They are no longer receiving bug fixes, including for security issues. These Pythons went EOL on: Python 2.6: 2013-10-29 Python 3.2: 2016-02-20 Python 3.3: 2017-09-29 For additional details on supported Python versions, see: https://devguide.python.org/#status-of-python-branches Removing support for EOL Pythons will reduce testing and maintenance resources. Using pypinfo, here are the download statistics of the project for the last 30 days, showing limited downloads from EOL Pythons: | python_version | percent | download_count | | -------------- | ------: | -------------: | | 2.7 | 90.33% | 7,975,885 | | 3.6 | 4.95% | 437,261 | | 3.5 | 2.99% | 263,637 | | 3.4 | 1.02% | 89,723 | | 2.6 | 0.69% | 60,511 | | 3.7 | 0.02% | 2,024 | | 3.3 | 0.00% | 441 | | 3.2 | 0.00% | 38 | | 3.8 | 0.00% | 9 | | None | 0.00% | 2 | By removing support for older Pythons, can remove or update the following workarounds and code: * Built-in function bin() is always available. * Built-in function callable() is always available. * Built-in function all() is always available. * The collections.OrderedDict class is always available. * The datetime.strptime() method is always available. * The platform module is always available. * The string.partition() method is always available. * The NullHandler class is always available. * The method .__trunc__() is always available. * Can use set literals. * Updated unittest is always available. The unittest2 module is unnecessary. Users on older versions of Python can continue to download, install, and use older versions of the library that continue to have support for older Pythons.
Diffstat (limited to 'tests/compat/test_binary.py')
-rw-r--r--tests/compat/test_binary.py56
1 files changed, 0 insertions, 56 deletions
diff --git a/tests/compat/test_binary.py b/tests/compat/test_binary.py
deleted file mode 100644
index 3e0949f..0000000
--- a/tests/compat/test_binary.py
+++ /dev/null
@@ -1,56 +0,0 @@
-#
-# This file is part of pyasn1 software.
-#
-# Copyright (c) 2005-2019, Ilya Etingof <etingof@gmail.com>
-# License: http://snmplabs.com/pyasn1/license.html
-#
-import sys
-
-try:
- import unittest2 as unittest
-except ImportError:
- import unittest
-
-from tests.base import BaseTestCase
-
-from pyasn1.compat import binary
-
-
-class BinaryTestCase(BaseTestCase):
-
- def test_bin_zero(self):
- assert '0b0' == binary.bin(0)
-
-
- def test_bin_noarg(self):
- try:
- binary.bin()
-
- except TypeError:
- pass
-
- except:
- assert 0, 'bin() tolerates no arguments'
-
-
- def test_bin_allones(self):
- assert '0b1111111111111111111111111111111111111111111111111111111111111111' == binary.bin(0xffffffffffffffff)
-
-
- def test_bin_allzeros(self):
- assert '0b0' == binary.bin(0x0000000)
-
-
-
- def test_bin_pos(self):
- assert '0b1000000010000000100000001' == binary.bin(0x01010101)
-
-
- def test_bin_neg(self):
- assert '-0b1000000010000000100000001' == binary.bin(-0x01010101)
-
-
-suite = unittest.TestLoader().loadTestsFromModule(sys.modules[__name__])
-
-if __name__ == '__main__':
- unittest.TextTestRunner(verbosity=2).run(suite)