unittest-xml-reporting | based test runner with Ant/JUnit like XML reporting | Unit Testing library

 by   xmlrunner Python Version: 3.2.0 License: Non-SPDX

kandi X-RAY | unittest-xml-reporting Summary

unittest-xml-reporting is a Python library typically used in Testing, Unit Testing, Jenkin applications. unittest-xml-reporting has no bugs, it has no vulnerabilities, it has build file available and it has low support. However unittest-xml-reporting has a Non-SPDX License. You can install using 'pip install unittest-xml-reporting' or download it from GitHub, PyPI.
A unittest test runner that can save test results to XML files in xUnit format. The files can be consumed by a wide range of tools, such as build systems, IDEs and continuous integration servers.
    Support
      Quality
        Security
          License
            Reuse
            Support
              Quality
                Security
                  License
                    Reuse

                      kandi-support Support

                        summary
                        unittest-xml-reporting has a low active ecosystem.
                        summary
                        It has 264 star(s) with 132 fork(s). There are 13 watchers for this library.
                        summary
                        It had no major release in the last 12 months.
                        summary
                        There are 8 open issues and 104 have been closed. On average issues are closed in 186 days. There are 1 open pull requests and 0 closed requests.
                        summary
                        It has a neutral sentiment in the developer community.
                        summary
                        The latest version of unittest-xml-reporting is 3.2.0
                        This Library - Support
                          Best in #Unit Testing
                            Average in #Unit Testing
                            This Library - Support
                              Best in #Unit Testing
                                Average in #Unit Testing

                                  kandi-Quality Quality

                                    summary
                                    unittest-xml-reporting has 0 bugs and 0 code smells.
                                    This Library - Quality
                                      Best in #Unit Testing
                                        Average in #Unit Testing
                                        This Library - Quality
                                          Best in #Unit Testing
                                            Average in #Unit Testing

                                              kandi-Security Security

                                                summary
                                                unittest-xml-reporting has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
                                                summary
                                                unittest-xml-reporting code analysis shows 0 unresolved vulnerabilities.
                                                summary
                                                There are 0 security hotspots that need review.
                                                This Library - Security
                                                  Best in #Unit Testing
                                                    Average in #Unit Testing
                                                    This Library - Security
                                                      Best in #Unit Testing
                                                        Average in #Unit Testing

                                                          kandi-License License

                                                            summary
                                                            unittest-xml-reporting has a Non-SPDX License.
                                                            summary
                                                            Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
                                                            This Library - License
                                                              Best in #Unit Testing
                                                                Average in #Unit Testing
                                                                This Library - License
                                                                  Best in #Unit Testing
                                                                    Average in #Unit Testing

                                                                      kandi-Reuse Reuse

                                                                        summary
                                                                        unittest-xml-reporting releases are available to install and integrate.
                                                                        summary
                                                                        Deployable package is available in PyPI.
                                                                        summary
                                                                        Build file is available. You can build the component from source.
                                                                        summary
                                                                        Installation instructions, examples and code snippets are available.
                                                                        summary
                                                                        It has 2204 lines of code, 204 functions and 36 files.
                                                                        summary
                                                                        It has medium code complexity. Code complexity directly impacts maintainability of the code.
                                                                        This Library - Reuse
                                                                          Best in #Unit Testing
                                                                            Average in #Unit Testing
                                                                            This Library - Reuse
                                                                              Best in #Unit Testing
                                                                                Average in #Unit Testing
                                                                                  Top functions reviewed by kandi - BETA
                                                                                  kandi has reviewed unittest-xml-reporting and discovered the below as its top functions. This is intended to give you an instant insight into unittest-xml-reporting implemented functionality, and help decide if they suit your requirements.
                                                                                  • Add a test
                                                                                    • Prepare the test callback
                                                                                    • Create a new element
                                                                                    • Append an element to the current context
                                                                                    • Called when the test finished
                                                                                    • Create a cdata section
                                                                                  • Start a test
                                                                                    • Write bytes to first
                                                                                  • Print the error list
                                                                                    • Get exception info
                                                                                  • Add an error
                                                                                  • Register a skipped test
                                                                                  • Registers a test failure
                                                                                  • Add an unexpected failure
                                                                                  • Add a test failure
                                                                                  • Stop the test
                                                                                  • Register a test
                                                                                  Get all kandi verified functions for this library.
                                                                                  Get all kandi verified functions for this library.

                                                                                  unittest-xml-reporting Key Features

                                                                                  unittest-based test runner with Ant/JUnit like XML reporting.

                                                                                  unittest-xml-reporting Examples and Code Snippets

                                                                                  No Code Snippets are available at this moment for unittest-xml-reporting.
                                                                                  Community Discussions

                                                                                  Trending Discussions on unittest-xml-reporting

                                                                                  Ansible execution environment: ModuleNotFoundError: No module named 'lxml'?
                                                                                  chevron right
                                                                                  Can't find installed module in my Azure DevOps pipeline
                                                                                  chevron right

                                                                                  QUESTION

                                                                                  Ansible execution environment: ModuleNotFoundError: No module named 'lxml'?
                                                                                  Asked 2021-Sep-10 at 16:49

                                                                                  When running a playbook using my custom execution environment I get the following error even though lxml is installed:

                                                                                  ModuleNotFoundError: No module named 'lxml'
                                                                                  

                                                                                  How can I ensure lxml is available?

                                                                                  My files and process for building the execution environemnt...

                                                                                  execution-environment.yaml:

                                                                                  ---
                                                                                  version: 1
                                                                                  
                                                                                  build_arg_defaults:
                                                                                    EE_BASE_IMAGE: 'quay.io/ansible/ansible-runner:stable-2.11-devel'
                                                                                  
                                                                                  dependencies:
                                                                                    galaxy: requirements.yml
                                                                                    python: requirements.txt
                                                                                  
                                                                                  additional_build_steps:
                                                                                   prepend:
                                                                                     - RUN pip install pip --upgrade
                                                                                     - RUN whoami
                                                                                     - RUN cat /etc/os-release
                                                                                  

                                                                                  requirements.txt:

                                                                                  jmespath==0.9.4
                                                                                  netaddr==0.7.19
                                                                                  pyvcloud==21.0.1
                                                                                  

                                                                                  pyvcloud includes dependency for lxml

                                                                                  requirements.yml:

                                                                                  ---
                                                                                  collections:
                                                                                    - name: ansible.utils
                                                                                      version: 2.3.1
                                                                                    - name: community.general
                                                                                    - name: ansible.netcommon
                                                                                  

                                                                                  Building the image log:

                                                                                  ansible-builder build --tag=ee-vdc-provisioning -v3
                                                                                  Ansible Builder is building your execution environment image, "ee-vdc-provisioning".
                                                                                  File context/_build/requirements.yml is already up-to-date.
                                                                                  File context/_build/requirements.txt had modifications and will be rewritten
                                                                                  Rewriting Containerfile to capture collection requirements
                                                                                  Running command:
                                                                                    docker build -f context/Dockerfile -t ee-vdc-provisioning context
                                                                                  Sending build context to Docker daemon   5.12kB
                                                                                  Step 1/22 : ARG EE_BASE_IMAGE=quay.io/ansible/ansible-runner:stable-2.11-devel
                                                                                  Step 2/22 : ARG EE_BUILDER_IMAGE=quay.io/ansible/ansible-builder:latest
                                                                                  Step 3/22 : FROM $EE_BASE_IMAGE as galaxy
                                                                                  stable-2.11-devel: Pulling from ansible/ansible-runner
                                                                                  7a0437f04f83: Already exists
                                                                                  ...
                                                                                  dea385bd2208: Pull complete
                                                                                  Digest: sha256:b5db8f78c5db830bd79589d926670cc6997a56e66ee1f4cf83f2d9600569489c
                                                                                  Status: Downloaded newer image for quay.io/ansible/ansible-runner:stable-2.11-devel
                                                                                   ---> bac3a63558ef
                                                                                  Step 4/22 : ARG ANSIBLE_GALAXY_CLI_COLLECTION_OPTS=
                                                                                   ---> Running in 4addc682993c
                                                                                  Removing intermediate container 4addc682993c
                                                                                   ---> 76904e6db013
                                                                                  Step 5/22 : USER root
                                                                                   ---> Running in c79b075ce2c1
                                                                                  Removing intermediate container c79b075ce2c1
                                                                                   ---> b1e145b630fc
                                                                                  Step 6/22 : ADD _build /build
                                                                                   ---> 0da78f554e57
                                                                                  Step 7/22 : WORKDIR /build
                                                                                   ---> Running in d2d9e54e1deb
                                                                                  Removing intermediate container d2d9e54e1deb
                                                                                   ---> b3eca50b6059
                                                                                  Step 8/22 : RUN ansible-galaxy role install -r requirements.yml --roles-path /usr/share/ansible/roles
                                                                                   ---> Running in 65cb2c2993f6
                                                                                  Skipping install, no requirements found
                                                                                  Removing intermediate container 65cb2c2993f6
                                                                                   ---> 7f9d44a54e1a
                                                                                  Step 9/22 : RUN ansible-galaxy collection install $ANSIBLE_GALAXY_CLI_COLLECTION_OPTS -r requirements.yml --collections-path /usr/share/ansible/collections
                                                                                   ---> Running in f3f2ae1f8933
                                                                                  Starting galaxy collection install process
                                                                                  Process install dependency map
                                                                                  Starting collection install process
                                                                                  Downloading https://galaxy.ansible.com/download/ansible-utils-2.3.1.tar.gz to /home/runner/.ansible/tmp/ansible-local-1v97miv3n/tmpsqqgh1je/ansible-utils-2.3.1-7fqkmpu9
                                                                                  Installing 'ansible.utils:2.3.1' to '/usr/share/ansible/collections/ansible_collections/ansible/utils'
                                                                                  ansible.utils:2.3.1 was installed successfully
                                                                                  Downloading https://galaxy.ansible.com/download/ansible-netcommon-2.4.0.tar.gz to /home/runner/.ansible/tmp/ansible-local-1v97miv3n/tmpsqqgh1je/ansible-netcommon-2.4.0-lp5tkb63
                                                                                  Installing 'ansible.netcommon:2.4.0' to '/usr/share/ansible/collections/ansible_collections/ansible/netcommon'
                                                                                  ansible.netcommon:2.4.0 was installed successfully
                                                                                  Downloading https://galaxy.ansible.com/download/community-general-3.6.0.tar.gz to /home/runner/.ansible/tmp/ansible-local-1v97miv3n/tmpsqqgh1je/community-general-3.6.0-t9_6t8qg
                                                                                  Installing 'community.general:3.6.0' to '/usr/share/ansible/collections/ansible_collections/community/general'
                                                                                  community.general:3.6.0 was installed successfully
                                                                                  Removing intermediate container f3f2ae1f8933
                                                                                   ---> b8af138c706f
                                                                                  Step 10/22 : FROM $EE_BUILDER_IMAGE as builder
                                                                                   ---> b8aaf3766431
                                                                                  Step 11/22 : COPY --from=galaxy /usr/share/ansible /usr/share/ansible
                                                                                   ---> Using cache
                                                                                   ---> d0ae7f063c09
                                                                                  Step 12/22 : ADD _build/requirements.txt requirements.txt
                                                                                   ---> b93f1b4efd85
                                                                                  Step 13/22 : RUN ansible-builder introspect --sanitize --user-pip=requirements.txt --write-bindep=/tmp/src/bindep.txt --write-pip=/tmp/src/requirements.txt
                                                                                   ---> Running in ce1856981322
                                                                                  # Sanitized dependencies for /usr/share/ansible/collections
                                                                                  ---
                                                                                  python:
                                                                                  - 'ansible-pylibssh>=0.2.0  # from collection ansible.netcommon'
                                                                                  - 'jxmlease  # from collection ansible.netcommon'
                                                                                  - 'ncclient  # from collection ansible.netcommon'
                                                                                  - 'netaddr==0.7.19  # from collection ansible.netcommon,user'
                                                                                  - 'paramiko  # from collection ansible.netcommon'
                                                                                  - 'xmltodict  # from collection ansible.netcommon,ansible.utils'
                                                                                  - 'jsonschema  # from collection ansible.utils'
                                                                                  - 'textfsm  # from collection ansible.utils'
                                                                                  - 'ttp  # from collection ansible.utils'
                                                                                  - 'jmespath==0.9.4  # from collection user'
                                                                                  - 'pyvcloud==21.0.1  # from collection user'
                                                                                  system:
                                                                                  - 'gcc-c++ [doc test platform:rpm]  # from collection ansible.netcommon, ansible.utils'
                                                                                  - 'libyaml-devel [test platform:rpm]  # from collection ansible.netcommon'
                                                                                  - 'libyaml-dev [test platform:dpkg]  # from collection ansible.netcommon'
                                                                                  - 'python3-devel [test platform:rpm]  # from collection ansible.netcommon, ansible.utils'
                                                                                  - 'python3 [test platform:rpm]  # from collection ansible.netcommon, ansible.utils'
                                                                                  - 'gcc [compile platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon,
                                                                                    ansible.netcommon'
                                                                                  - 'libssh-devel [compile platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-Cython [compile platform:centos-8 platform:rhel-8]  # from collection
                                                                                    ansible.netcommon'
                                                                                  - 'python38-six [platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-lxml [platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'findutils [compile platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'make [compile platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-devel [compile platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-cffi [platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-cryptography [platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  - 'python38-pycparser [platform:centos-8 platform:rhel-8]  # from collection ansible.netcommon'
                                                                                  
                                                                                  Creating parent directory for /tmp/src/requirements.txt
                                                                                  Removing intermediate container ce1856981322
                                                                                   ---> 4c6b34447822
                                                                                  Step 14/22 : RUN assemble
                                                                                   ---> Running in f55f696895c9
                                                                                  ++ source /etc/os-release
                                                                                  +++ NAME='CentOS Linux'
                                                                                  +++ VERSION=8
                                                                                  +++ ID=centos
                                                                                  +++ ID_LIKE='rhel fedora'
                                                                                  +++ VERSION_ID=8
                                                                                  +++ PLATFORM_ID=platform:el8
                                                                                  +++ PRETTY_NAME='CentOS Linux 8'
                                                                                  +++ ANSI_COLOR='0;31'
                                                                                  +++ CPE_NAME=cpe:/o:centos:centos:8
                                                                                  +++ HOME_URL=https://centos.org/
                                                                                  +++ BUG_REPORT_URL=https://bugs.centos.org/
                                                                                  +++ CENTOS_MANTISBT_PROJECT=CentOS-8
                                                                                  +++ CENTOS_MANTISBT_PROJECT_VERSION=8
                                                                                  ++ echo centos
                                                                                  + RELEASE=centos
                                                                                  + PKGMGR=
                                                                                  + PKGMGR_OPTS=
                                                                                  + '[' -z ']'
                                                                                  + PKGMGR=/usr/bin/dnf
                                                                                  + '[' -f /usr/bin/microdnf ']'
                                                                                  + mkdir -p /output/bindep
                                                                                  + mkdir -p /output/wheels
                                                                                  + mkdir -p /tmp/src
                                                                                  + cd /tmp/src
                                                                                  + /usr/bin/dnf update -y
                                                                                  CentOS Linux 8 - AppStream                      3.3 MB/s | 8.8 MB     00:02    
                                                                                  CentOS Linux 8 - BaseOS                          10 MB/s | 5.6 MB     00:00    
                                                                                  CentOS Linux 8 - Extras                         4.6 kB/s |  10 kB     00:02    
                                                                                  CentOS Linux 8 - PowerTools                     2.2 MB/s | 2.3 MB     00:01    
                                                                                  Extra Packages for Enterprise Linux Modular 8 - 561 kB/s | 939 kB     00:01    
                                                                                  Dependencies resolved.
                                                                                  Nothing to do.
                                                                                  Complete!
                                                                                  + PACKAGES=
                                                                                  + PIP_OPTS=
                                                                                  + install_bindep
                                                                                  + '[' -f bindep.txt ']'
                                                                                  + bindep -l newline
                                                                                  + sort
                                                                                  + '[' centos == centos ']'
                                                                                  + bindep -l newline -b epel
                                                                                  + sort
                                                                                  + grep -Fxvf /output/bindep/run.txt /output/bindep/stage.txt
                                                                                  + true
                                                                                  + rm -rf /output/bindep/stage.txt
                                                                                  ++ bindep -b compile
                                                                                  ++ true
                                                                                  + compile_packages='gcc
                                                                                  libssh-devel
                                                                                  make
                                                                                  python38-Cython
                                                                                  python38-cffi
                                                                                  python38-cryptography
                                                                                  python38-devel
                                                                                  python38-lxml
                                                                                  python38-pycparser
                                                                                  python38-six'
                                                                                  + '[' '!' -z 'gcc
                                                                                  libssh-devel
                                                                                  make
                                                                                  python38-Cython
                                                                                  python38-cffi
                                                                                  python38-cryptography
                                                                                  python38-devel
                                                                                  python38-lxml
                                                                                  python38-pycparser
                                                                                  python38-six' ']'
                                                                                  + /usr/bin/dnf install -y gcc libssh-devel make python38-Cython python38-cffi python38-cryptography python38-devel python38-lxml python38-pycparser python38-six
                                                                                  Last metadata expiration check: 0:00:10 ago on Wed Sep  8 06:32:08 2021.
                                                                                  Dependencies resolved.
                                                                                  
                                                                                  Downloading Packages:
                                                                                  ...  
                                                                                  (15/29): python38-lxml-4.4.1-5.module_el8.4.0+6 4.0 MB/s | 1.5 MB     00:00    
                                                                                  ... 
                                                                                  --------------------------------------------------------------------------------
                                                                                  Total                                           6.1 MB/s |  51 MB     00:08     
                                                                                  Running transaction check
                                                                                  Transaction check succeeded.
                                                                                  Running transaction test
                                                                                  Transaction test succeeded.
                                                                                  Running transaction
                                                                                    Preparing        :                                                        1/1 
                                                                                    Installing       : libmpc-1.1.0-9.1.el8.x86_64                           1/29 
                                                                                    Installing       : cpp-8.4.1-1.el8.x86_64                                2/29 
                                                                                    ...
                                                                                    Verifying        : python38-lxml-4.4.1-5.module_el8.4.0+647+0ba99ce8.   13/29 
                                                                                    ...
                                                                                  
                                                                                  Installed:
                                                                                    cmake-filesystem-3.18.2-11.el8_4.x86_64                                       
                                                                                    cpp-8.4.1-1.el8.x86_64                                                        
                                                                                    gcc-8.4.1-1.el8.x86_64                                                        
                                                                                    ....                       
                                                                                    python38-lxml-4.4.1-5.module_el8.4.0+647+0ba99ce8.x86_64                      
                                                                                    ...                   
                                                                                  
                                                                                  Complete!
                                                                                  + python3 -m venv /tmp/venv --system-site-packages --without-pip
                                                                                  + source /tmp/venv/bin/activate
                                                                                  ++ deactivate nondestructive
                                                                                  ++ '[' -n '' ']'
                                                                                  ++ '[' -n '' ']'
                                                                                  ++ '[' -n /bin/bash -o -n '' ']'
                                                                                  ++ hash -r
                                                                                  ++ '[' -n '' ']'
                                                                                  ++ unset VIRTUAL_ENV
                                                                                  ++ '[' '!' nondestructive = nondestructive ']'
                                                                                  ++ VIRTUAL_ENV=/tmp/venv
                                                                                  ++ export VIRTUAL_ENV
                                                                                  ++ _OLD_VIRTUAL_PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                                                                                  ++ PATH=/tmp/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
                                                                                  ++ export PATH
                                                                                  ++ '[' -n '' ']'
                                                                                  ++ '[' -z '' ']'
                                                                                  ++ _OLD_VIRTUAL_PS1=
                                                                                  ++ '[' 'x(venv) ' '!=' x ']'
                                                                                  ++ PS1='(venv) '
                                                                                  ++ export PS1
                                                                                  ++ '[' -n /bin/bash -o -n '' ']'
                                                                                  ++ hash -r
                                                                                  + '[' -f /tmp/src/upper-constraints.txt ']'
                                                                                  + [[ -n '' ]]
                                                                                  + install_wheels
                                                                                  + '[' -f /tmp/src/build-requirements.txt ']'
                                                                                  + '[' -f setup.py ']'
                                                                                  + '[' -f /tmp/src/requirements.txt ']'
                                                                                  + '[' '!' -f /output/requirements.txt ']'
                                                                                  + pip3 install --cache-dir=/output/wheels -r /tmp/src/requirements.txt
                                                                                  Collecting ansible-pylibssh>=0.2.0
                                                                                    Downloading ansible_pylibssh-0.2.0-cp38-cp38-manylinux2014_x86_64.whl (2.2 MB)
                                                                                  Collecting jxmlease
                                                                                    Downloading jxmlease-1.0.3-py2.py3-none-any.whl (37 kB)
                                                                                  Collecting ncclient
                                                                                    Downloading ncclient-0.6.12.tar.gz (106 kB)
                                                                                  Collecting netaddr==0.7.19
                                                                                    Downloading netaddr-0.7.19-py2.py3-none-any.whl (1.6 MB)
                                                                                  Collecting paramiko
                                                                                    Downloading paramiko-2.7.2-py2.py3-none-any.whl (206 kB)
                                                                                  Collecting xmltodict
                                                                                    Downloading xmltodict-0.12.0-py2.py3-none-any.whl (9.2 kB)
                                                                                  Collecting jsonschema
                                                                                    Downloading jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
                                                                                  Collecting textfsm
                                                                                    Downloading textfsm-1.1.2-py2.py3-none-any.whl (44 kB)
                                                                                  Collecting ttp
                                                                                    Downloading ttp-0.7.2.tar.gz (63 kB)
                                                                                  Collecting jmespath==0.9.4
                                                                                    Downloading jmespath-0.9.4-py2.py3-none-any.whl (24 kB)
                                                                                  Collecting pyvcloud==21.0.1
                                                                                    Downloading pyvcloud-21.0.1-py3-none-any.whl (204 kB)
                                                                                  Requirement already satisfied: lxml>=4.2.1 in /usr/lib64/python3.8/site-packages (from pyvcloud==21.0.1->-r /tmp/src/requirements.txt (line 11)) (4.4.1)
                                                                                  Collecting humanfriendly>=4.8
                                                                                    Downloading humanfriendly-9.2-py2.py3-none-any.whl (86 kB)
                                                                                  Collecting unittest-xml-reporting>=2.2.1
                                                                                    Downloading unittest_xml_reporting-3.0.4-py2.py3-none-any.whl (19 kB)
                                                                                  Collecting requests>=2.18.4
                                                                                    Downloading requests-2.26.0-py2.py3-none-any.whl (62 kB)
                                                                                  Requirement already satisfied: PyYAML>=4.2b1 in /usr/local/lib64/python3.8/site-packages (from pyvcloud==21.0.1->-r /tmp/src/requirements.txt (line 11)) (5.4.1)
                                                                                  Collecting pygments>=2.2.0
                                                                                    Downloading Pygments-2.10.0-py3-none-any.whl (1.0 MB)
                                                                                  Requirement already satisfied: setuptools>0.6 in /usr/lib/python3.8/site-packages (from ncclient->-r /tmp/src/requirements.txt (line 3)) (41.6.0)
                                                                                  Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from ncclient->-r /tmp/src/requirements.txt (line 3)) (1.12.0)
                                                                                  Collecting bcrypt>=3.1.3
                                                                                    Downloading bcrypt-3.2.0-cp36-abi3-manylinux2010_x86_64.whl (63 kB)
                                                                                  Requirement already satisfied: cryptography>=2.5 in /usr/lib64/python3.8/site-packages (from paramiko->-r /tmp/src/requirements.txt (line 5)) (2.8)
                                                                                  Collecting pynacl>=1.0.1
                                                                                    Downloading PyNaCl-1.4.0-cp35-abi3-manylinux1_x86_64.whl (961 kB)
                                                                                  Collecting pyrsistent>=0.14.0
                                                                                    Downloading pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl (118 kB)
                                                                                  Collecting attrs>=17.4.0
                                                                                    Downloading attrs-21.2.0-py2.py3-none-any.whl (53 kB)
                                                                                  Collecting future
                                                                                    Downloading future-0.18.2.tar.gz (829 kB)
                                                                                  Requirement already satisfied: cffi>=1.1 in /usr/lib64/python3.8/site-packages (from bcrypt>=3.1.3->paramiko->-r /tmp/src/requirements.txt (line 5)) (1.13.2)
                                                                                  Requirement already satisfied: pycparser in /usr/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko->-r /tmp/src/requirements.txt (line 5)) (2.19)
                                                                                  Collecting urllib3<1.27,>=1.21.1
                                                                                    Downloading urllib3-1.26.6-py2.py3-none-any.whl (138 kB)
                                                                                  Collecting certifi>=2017.4.17
                                                                                    Downloading certifi-2021.5.30-py2.py3-none-any.whl (145 kB)
                                                                                  Collecting charset-normalizer~=2.0.0
                                                                                    Downloading charset_normalizer-2.0.4-py3-none-any.whl (36 kB)
                                                                                  Requirement already satisfied: idna<4,>=2.5 in /usr/lib/python3.8/site-packages (from requests>=2.18.4->pyvcloud==21.0.1->-r /tmp/src/requirements.txt (line 11)) (2.8)
                                                                                  Building wheels for collected packages: ncclient, ttp, future
                                                                                    Building wheel for ncclient (setup.py): started
                                                                                    Building wheel for ncclient (setup.py): finished with status 'done'
                                                                                    Created wheel for ncclient: filename=ncclient-0.6.12-py2.py3-none-any.whl size=83781 sha256=ab7ff67d84af8ee205b2127d84facfe7c3004ac2baf7f9044992d8611c1f9aba
                                                                                    Stored in directory: /output/wheels/wheels/b2/ea/95/9bdf798bf88d883a5ee9536d8a483042030d182ab252953b9d
                                                                                    Building wheel for ttp (setup.py): started
                                                                                    Building wheel for ttp (setup.py): finished with status 'done'
                                                                                    Created wheel for ttp: filename=ttp-0.7.2-py2.py3-none-any.whl size=82592 sha256=4128235c837b71ad65b52aeab39073636cba7aabdfe6e67aa0bf1822d56758d6
                                                                                    Stored in directory: /output/wheels/wheels/a5/e9/86/589e41ee5c74286a197095d4aabff1896eea950bb45ea593be
                                                                                    Building wheel for future (setup.py): started
                                                                                    Building wheel for future (setup.py): finished with status 'done'
                                                                                    Created wheel for future: filename=future-0.18.2-py3-none-any.whl size=491056 sha256=9aa6ce7d6e6150df9cfa35c0debb6e450d447eaec1789a03e34d9bc47084859a
                                                                                    Stored in directory: /output/wheels/wheels/8e/70/28/3d6ccd6e315f65f245da085482a2e1c7d14b90b30f239e2cf4
                                                                                  Successfully built ncclient ttp future
                                                                                  Installing collected packages: urllib3, pynacl, charset-normalizer, certifi, bcrypt, unittest-xml-reporting, requests, pyrsistent, pygments, paramiko, humanfriendly, future, attrs, xmltodict, ttp, textfsm, pyvcloud, netaddr, ncclient, jxmlease, jsonschema, jmespath, ansible-pylibssh
                                                                                  Successfully installed ansible-pylibssh-0.2.0 attrs-21.2.0 bcrypt-3.2.0 certifi-2021.5.30 charset-normalizer-2.0.4 future-0.18.2 humanfriendly-9.2 jmespath-0.9.4 jsonschema-3.2.0 jxmlease-1.0.3 ncclient-0.6.12 netaddr-0.7.19 paramiko-2.7.2 pygments-2.10.0 pynacl-1.4.0 pyrsistent-0.18.0 pyvcloud-21.0.1 requests-2.26.0 textfsm-1.1.2 ttp-0.7.2 unittest-xml-reporting-3.0.4 urllib3-1.26.6 xmltodict-0.12.0
                                                                                  WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
                                                                                  + cp /tmp/src/requirements.txt /output/requirements.txt
                                                                                  ++ ls -1 '/output/wheels/*whl'
                                                                                  ++ wc -l
                                                                                  + '[' 0 -gt 0 ']'
                                                                                  ++ get-extras-packages
                                                                                  + /usr/bin/dnf clean all
                                                                                  38 files removed
                                                                                  + rm -rf /var/cache/dnf /var/cache/yum
                                                                                  + rm -rf /var/lib/dnf/history.sqlite /var/lib/dnf/history.sqlite-shm /var/lib/dnf/history.sqlite-wal
                                                                                  + rm -rf /var/log/dnf.librepo.log /var/log/dnf.log /var/log/dnf.rpm.log /var/log/hawkey.log
                                                                                  + rm -rf /tmp/venv
                                                                                  Removing intermediate container f55f696895c9
                                                                                   ---> f52fd8437571
                                                                                  Step 15/22 : FROM $EE_BASE_IMAGE
                                                                                   ---> bac3a63558ef
                                                                                  Step 16/22 : USER root
                                                                                   ---> Running in fc6888e27374
                                                                                  Removing intermediate container fc6888e27374
                                                                                   ---> ee14881aa582
                                                                                  Step 17/22 : RUN pip install pip --upgrade
                                                                                   ---> Running in d7f03db5ab97
                                                                                  Requirement already satisfied: pip in /usr/local/lib/python3.8/site-packages (21.2.4)
                                                                                  WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
                                                                                  Removing intermediate container d7f03db5ab97
                                                                                   ---> 1b7904758bf0
                                                                                  Step 18/22 : RUN whoami
                                                                                   ---> Running in 161168263f0f
                                                                                  root
                                                                                  Removing intermediate container 161168263f0f
                                                                                   ---> 1e54d5ebed25
                                                                                  Step 19/22 : RUN cat /etc/os-release
                                                                                   ---> Running in 8f2e3985f498
                                                                                  NAME="CentOS Linux"
                                                                                  VERSION="8"
                                                                                  ID="centos"
                                                                                  ID_LIKE="rhel fedora"
                                                                                  VERSION_ID="8"
                                                                                  PLATFORM_ID="platform:el8"
                                                                                  PRETTY_NAME="CentOS Linux 8"
                                                                                  ANSI_COLOR="0;31"
                                                                                  CPE_NAME="cpe:/o:centos:centos:8"
                                                                                  HOME_URL="https://centos.org/"
                                                                                  BUG_REPORT_URL="https://bugs.centos.org/"
                                                                                  CENTOS_MANTISBT_PROJECT="CentOS-8"
                                                                                  CENTOS_MANTISBT_PROJECT_VERSION="8"
                                                                                  Removing intermediate container 8f2e3985f498
                                                                                   ---> 7aa8d50dcc2b
                                                                                  Step 20/22 : COPY --from=galaxy /usr/share/ansible /usr/share/ansible
                                                                                   ---> c1f18affa806
                                                                                  Step 21/22 : COPY --from=builder /output/ /output/
                                                                                   ---> b237b7b29502
                                                                                  Step 22/22 : RUN /output/install-from-bindep && rm -rf /output/wheels
                                                                                   ---> Running in 52b7c2a29525
                                                                                  + PKGMGR=
                                                                                  + PKGMGR_OPTS=
                                                                                  + '[' -z ']'
                                                                                  + PKGMGR=/usr/bin/dnf
                                                                                  + '[' -f /usr/bin/microdnf ']'
                                                                                  + /usr/bin/dnf update -y
                                                                                  CentOS Linux 8 - AppStream                      4.1 MB/s | 8.8 MB     00:02    
                                                                                  CentOS Linux 8 - BaseOS                         7.0 MB/s | 5.6 MB     00:00    
                                                                                  CentOS Linux 8 - Extras                          13 kB/s |  10 kB     00:00    
                                                                                  CentOS Linux 8 - PowerTools                     3.0 MB/s | 2.3 MB     00:00    
                                                                                  Extra Packages for Enterprise Linux Modular 8 - 512 kB/s | 939 kB     00:01    
                                                                                  Last metadata expiration check: 0:00:01 ago on Wed Sep  8 06:33:45 2021.
                                                                                  Dependencies resolved.
                                                                                  Nothing to do.
                                                                                  Complete!
                                                                                  + '[' -f /output/bindep/run.txt ']'
                                                                                  ++ cat /output/bindep/run.txt
                                                                                  + PACKAGES='python38-cffi
                                                                                  python38-cryptography
                                                                                  python38-lxml
                                                                                  python38-pycparser
                                                                                  python38-six'
                                                                                  + '[' '!' -z 'python38-cffi
                                                                                  python38-cryptography
                                                                                  python38-lxml
                                                                                  python38-pycparser
                                                                                  python38-six' ']'
                                                                                  + /usr/bin/dnf install -y python38-cffi python38-cryptography python38-lxml python38-pycparser python38-six
                                                                                  Last metadata expiration check: 0:00:04 ago on Wed Sep  8 06:33:45 2021.
                                                                                  Package python38-cffi-1.13.2-3.module_el8.4.0+647+0ba99ce8.x86_64 is already installed.
                                                                                  Package python38-cryptography-2.8-3.module_el8.4.0+647+0ba99ce8.x86_64 is already installed.
                                                                                  Package python38-lxml-4.4.1-5.module_el8.4.0+647+0ba99ce8.x86_64 is already installed.
                                                                                  Package python38-pycparser-2.19-3.module_el8.4.0+647+0ba99ce8.noarch is already installed.
                                                                                  Package python38-six-1.12.0-10.module_el8.4.0+647+0ba99ce8.noarch is already installed.
                                                                                  Dependencies resolved.
                                                                                  Nothing to do.
                                                                                  Complete!
                                                                                  + '[' -f /output/bindep/epel.txt ']'
                                                                                  ++ cat /output/bindep/epel.txt
                                                                                  + EPEL_PACKAGES=
                                                                                  + '[' '!' -z '' ']'
                                                                                  + '[' -f /output/upper-constraints.txt ']'
                                                                                  + '[' -f /output/requirements.txt ']'
                                                                                  + pip3 install --cache-dir=/output/wheels -r /output/requirements.txt
                                                                                  Collecting ansible-pylibssh>=0.2.0
                                                                                    Using cached ansible_pylibssh-0.2.0-cp38-cp38-manylinux2014_x86_64.whl (2.2 MB)
                                                                                  Collecting jxmlease
                                                                                    Using cached jxmlease-1.0.3-py2.py3-none-any.whl (37 kB)
                                                                                  Requirement already satisfied: ncclient in /usr/local/lib/python3.8/site-packages (from -r /output/requirements.txt (line 3)) (0.6.12)
                                                                                  Collecting netaddr==0.7.19
                                                                                    Using cached netaddr-0.7.19-py2.py3-none-any.whl (1.6 MB)
                                                                                  Requirement already satisfied: paramiko in /usr/local/lib/python3.8/site-packages (from -r /output/requirements.txt (line 5)) (2.7.2)
                                                                                  Requirement already satisfied: xmltodict in /usr/local/lib/python3.8/site-packages (from -r /output/requirements.txt (line 6)) (0.12.0)
                                                                                  Collecting jsonschema
                                                                                    Using cached jsonschema-3.2.0-py2.py3-none-any.whl (56 kB)
                                                                                  Collecting textfsm
                                                                                    Using cached textfsm-1.1.2-py2.py3-none-any.whl (44 kB)
                                                                                  Collecting ttp
                                                                                    Using cached ttp-0.7.2-py2.py3-none-any.whl
                                                                                  Collecting jmespath==0.9.4
                                                                                    Using cached jmespath-0.9.4-py2.py3-none-any.whl (24 kB)
                                                                                  Collecting pyvcloud==21.0.1
                                                                                    Using cached pyvcloud-21.0.1-py3-none-any.whl (204 kB)
                                                                                  Collecting unittest-xml-reporting>=2.2.1
                                                                                    Using cached unittest_xml_reporting-3.0.4-py2.py3-none-any.whl (19 kB)
                                                                                  Collecting pygments>=2.2.0
                                                                                    Using cached Pygments-2.10.0-py3-none-any.whl (1.0 MB)
                                                                                  Requirement already satisfied: PyYAML>=4.2b1 in /usr/lib64/python3.8/site-packages (from pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (5.4.1)
                                                                                  Requirement already satisfied: lxml>=4.2.1 in /usr/lib64/python3.8/site-packages (from pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (4.4.1)
                                                                                  Collecting humanfriendly>=4.8
                                                                                    Using cached humanfriendly-9.2-py2.py3-none-any.whl (86 kB)
                                                                                  Requirement already satisfied: requests>=2.18.4 in /usr/lib/python3.8/site-packages (from pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (2.22.0)
                                                                                  Requirement already satisfied: six in /usr/lib/python3.8/site-packages (from ncclient->-r /output/requirements.txt (line 3)) (1.12.0)
                                                                                  Requirement already satisfied: setuptools>0.6 in /usr/lib/python3.8/site-packages (from ncclient->-r /output/requirements.txt (line 3)) (41.6.0)
                                                                                  Requirement already satisfied: pynacl>=1.0.1 in /usr/local/lib64/python3.8/site-packages (from paramiko->-r /output/requirements.txt (line 5)) (1.4.0)
                                                                                  Requirement already satisfied: bcrypt>=3.1.3 in /usr/local/lib64/python3.8/site-packages (from paramiko->-r /output/requirements.txt (line 5)) (3.2.0)
                                                                                  Requirement already satisfied: cryptography>=2.5 in /usr/lib64/python3.8/site-packages (from paramiko->-r /output/requirements.txt (line 5)) (2.8)
                                                                                  Collecting pyrsistent>=0.14.0
                                                                                    Using cached pyrsistent-0.18.0-cp38-cp38-manylinux1_x86_64.whl (118 kB)
                                                                                  Collecting attrs>=17.4.0
                                                                                    Using cached attrs-21.2.0-py2.py3-none-any.whl (53 kB)
                                                                                  Collecting future
                                                                                    Using cached future-0.18.2-py3-none-any.whl
                                                                                  Requirement already satisfied: cffi>=1.1 in /usr/lib64/python3.8/site-packages (from bcrypt>=3.1.3->paramiko->-r /output/requirements.txt (line 5)) (1.13.2)
                                                                                  Requirement already satisfied: pycparser in /usr/lib/python3.8/site-packages (from cffi>=1.1->bcrypt>=3.1.3->paramiko->-r /output/requirements.txt (line 5)) (2.19)
                                                                                  Requirement already satisfied: chardet<3.1.0,>=3.0.2 in /usr/lib/python3.8/site-packages (from requests>=2.18.4->pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (3.0.4)
                                                                                  Requirement already satisfied: idna<2.9,>=2.5 in /usr/lib/python3.8/site-packages (from requests>=2.18.4->pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (2.8)
                                                                                  Requirement already satisfied: urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1 in /usr/lib/python3.8/site-packages (from requests>=2.18.4->pyvcloud==21.0.1->-r /output/requirements.txt (line 11)) (1.25.7)
                                                                                  Installing collected packages: unittest-xml-reporting, pyrsistent, pygments, humanfriendly, future, attrs, ttp, textfsm, pyvcloud, netaddr, jxmlease, jsonschema, jmespath, ansible-pylibssh
                                                                                  Successfully installed ansible-pylibssh-0.2.0 attrs-21.2.0 future-0.18.2 humanfriendly-9.2 jmespath-0.9.4 jsonschema-3.2.0 jxmlease-1.0.3 netaddr-0.7.19 pygments-2.10.0 pyrsistent-0.18.0 pyvcloud-21.0.1 textfsm-1.1.2 ttp-0.7.2 unittest-xml-reporting-3.0.4
                                                                                  WARNING: Running pip as the 'root' user can result in broken permissions and conflicting behaviour with the system package manager. It is recommended to use a virtual environment instead: https://pip.pypa.io/warnings/venv
                                                                                  + EXTRAS=
                                                                                  + '[' -f /output/packages.txt ']'
                                                                                  ++ ls -1 '/output/wheels/*whl'
                                                                                  ++ wc -l
                                                                                  + '[' 0 -gt 0 ']'
                                                                                  + '[' '!' -z '' ']'
                                                                                  + /usr/bin/dnf clean all
                                                                                  38 files removed
                                                                                  + rm -rf /var/cache/dnf /var/cache/yum
                                                                                  + rm -rf /var/lib/dnf/history.sqlite /var/lib/dnf/history.sqlite-shm /var/lib/dnf/history.sqlite-wal
                                                                                  + rm -rf /var/log/dnf.librepo.log /var/log/dnf.log /var/log/dnf.rpm.log /var/log/hawkey.log
                                                                                  Removing intermediate container 52b7c2a29525
                                                                                   ---> 546ab86ee4cb
                                                                                  Successfully built 546ab86ee4cb
                                                                                  Successfully tagged ee-vdc-provisioning:latest
                                                                                  
                                                                                  Complete! The build context can be found at: /repo/awx/execution_environments/vdc_provisioning/context
                                                                                  

                                                                                  ANSWER

                                                                                  Answered 2021-Sep-10 at 16:49

                                                                                  Ensure to add a bindep.txt file:

                                                                                  python38-devel [platform:rpm compile]
                                                                                  subversion [platform:rpm]
                                                                                  subversion [platform:dpkg]
                                                                                  git-lfs [platform:rpm]
                                                                                  

                                                                                  and add it to your execution-environment.yml:

                                                                                  dependencies:
                                                                                    galaxy: requirements.yml
                                                                                    python: requirements.txt
                                                                                    system: bindep.txt
                                                                                  

                                                                                  Someone else must explain what the system level dependencies are but this is what the docs say and lxml won't work without it:

                                                                                  The bindep requirements file specifies cross-platform requirements, if there are any. These get processed by bindep and then passed to dnf (other platforms are not yet supported as of the publication of this blog post)

                                                                                  Source https://stackoverflow.com/questions/69098214

                                                                                  QUESTION

                                                                                  Can't find installed module in my Azure DevOps pipeline
                                                                                  Asked 2021-Sep-03 at 11:20

                                                                                  I am trying to write mu first Azure DevOps pipeline and I have problem to run my unittests. Here is my pipeline

                                                                                  - stage: Build
                                                                                    displayName: Build stage
                                                                                    jobs:
                                                                                    - job: 'Build'
                                                                                      pool:
                                                                                        vmImage: '$(vmImageName)'
                                                                                      steps:
                                                                                      - task: UsePythonVersion@0
                                                                                        inputs:
                                                                                          versionSpec: '$(pythonVersion)'
                                                                                        displayName: 'Use Python $(pythonVersion)'
                                                                                      - script: |
                                                                                            python3 -m venv venv
                                                                                            source venv/bin/activate
                                                                                            python3 -m pip install --upgrade pip
                                                                                            pip3 install setup
                                                                                            pip3 install -r requirements.txt
                                                                                        workingDirectory: $(projectRoot)
                                                                                        displayName: 'Install requirements'
                                                                                  
                                                                                      - script: |
                                                                                          python3 PoC1/tests.py
                                                                                        displayName: 'Run unittests'
                                                                                  

                                                                                  The problem is that it s stopping on unittest located in PoC1 directory with:

                                                                                  File "PoC1/tests.py", line 2, in import requests ModuleNotFoundError: No module named 'requests'

                                                                                  After installing all of requirements I have output:

                                                                                  Successfully installed azure-core-1.18.0 azure-functions-1.7.2 azure-storage-blob-12.8.1 certifi-2021.5.30 cffi-1.14.6 charset-normalizer-2.0.4 cryptography-3.4.8 idna-3.2 isodate-0.6.0 msrest-0.6.21 oauthlib-3.1.1 pycparser-2.20 requests-2.26.0 requests-oauthlib-1.3.0 six-1.16.0 unittest-xml-reporting-3.0.4 urllib3-1.26.6
                                                                                  

                                                                                  So it s seems like everything is installed correctly but can t find requests module while running my tests. Do you have any idea what can be issue?

                                                                                  ANSWER

                                                                                  Answered 2021-Sep-03 at 11:20

                                                                                  You are installing all required dependencies inside a venv, and executing the script outside of it, so you have no visibility of those packages when trying to run the file. You could install the packages outside of the venv, or use the venv/bin/python3 to run the file instead.

                                                                                  Source https://stackoverflow.com/questions/69043936

                                                                                  Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                                                                                  Vulnerabilities

                                                                                  No vulnerabilities reported

                                                                                  Install unittest-xml-reporting

                                                                                  The easiest way to install unittest-xml-reporting is via Pip:.

                                                                                  Support

                                                                                  unittest has the concept of sub-tests for a unittest.TestCase; this doesn't map well to an existing xUnit concept, so you won't find it in the schema. What that means, is that you lose some granularity in the reports for sub-tests. unittest also does not report successful sub-tests, so the accounting won't be exact.
                                                                                  Find more information at:
                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit
                                                                                  Install
                                                                                • PyPI

                                                                                  pip install unittest-xml-reporting

                                                                                • CLONE
                                                                                • HTTPS

                                                                                  https://github.com/xmlrunner/unittest-xml-reporting.git

                                                                                • CLI

                                                                                  gh repo clone xmlrunner/unittest-xml-reporting

                                                                                • sshUrl

                                                                                  git@github.com:xmlrunner/unittest-xml-reporting.git

                                                                                • Share this Page

                                                                                  share link

                                                                                  Explore Related Topics

                                                                                  Reuse Pre-built Kits with unittest-xml-reporting

                                                                                  Consider Popular Unit Testing Libraries

                                                                                  googletest

                                                                                  by google

                                                                                  mocha

                                                                                  by mochajs

                                                                                  enzyme

                                                                                  by enzymejs

                                                                                  ava

                                                                                  by avajs

                                                                                  phpunit

                                                                                  by sebastianbergmann

                                                                                  Compare Unit Testing Libraries with Highest Support

                                                                                  robolectric

                                                                                  by robolectric

                                                                                  mockito

                                                                                  by mockito

                                                                                  junit5

                                                                                  by junit-team

                                                                                  mocha

                                                                                  by mochajs

                                                                                  spock

                                                                                  by spockframework

                                                                                  Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
                                                                                  Find more libraries
                                                                                  Explore Kits - Develop, implement, customize Projects, Custom Functions and Applications with kandi kits​
                                                                                  Save this library and start creating your kit