LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Programming (https://www.linuxquestions.org/questions/programming-9/)
-   -   Veritying non-breakage in a Python 3 library installed as a distro repo package (Debian Testing) (https://www.linuxquestions.org/questions/programming-9/veritying-non-breakage-in-a-python-3-library-installed-as-a-distro-repo-package-debian-testing-4175624573/)

MickeyLater 02-27-2018 12:55 PM

Veritying non-breakage in a Python 3 library installed as a distro repo package (Debian Testing)
 
All I've done so far after installing a Python 3 library through the Debian Testing package manager, is fire up the command interpreter and use an import statement on it. So far, no signs of breakage. Are there more rigorous tests I can use to verify the library's integrity, at least in terms of any bugs that were purely passed on from the library's maintainers and not introduced by the package maintainers?

teckk 02-27-2018 02:36 PM

Use the latest version of python
Code:

python --version
Python 3.6.4

You don't say what your plans are. If all you want is basic python functionality
Code:

>>> a = 1
>>> b = 2
>>> print ((a) + (b))
3
>>> import time
>>> for i in range(1, 6):
...    time.sleep(1)
...    print (i)
...
1
2
3
4
5

If you are going to use python then you will probably want to install some modules like urllib for example.
Code:

>>> import os, time, urllib.request
>>> user_agent = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:57.0) '
...                'Gecko/20100101 Firefox/57.0'}
>>> url = [
... 'http://www.one.com',
... 'http://www.two.com',
... 'http://www.three.com'
... ]
>>> a = int(1)
>>> for i in url:
...    req = urllib.request.Request((i), data=None, headers=user_agent)
...    print (req)
...    time.sleep(1)
...    a = int(a+1)
...
<urllib.request.Request object at 0x7feee622b4a8>
<urllib.request.Request object at 0x7feee6b50e80>
<urllib.request.Request object at 0x7feee622b4a8>



All times are GMT -5. The time now is 09:40 PM.