Skip to content

mcc-sw-eng-course/python-programs-charlieitesm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

Author: Carlos E. Hdez. R. Student ID: A****1616

Pair: José René Signoret Becerra Student ID: A****4797

Prerequisites

You need Python3.6 or better to run these modules

Python 3.5 or less will not work.

Make sure that you have installed the Coverage.py module with pip or anaconda.

$ pip3 install coverage

In order to run the coverage from the console, first move to the src/ folder.

Coverage.py can receive module names (which can include Python packages) in the same way as the python interpreter.

Since this repository is using Python packages to organize the assignments, we need to specify them when running the test module, we can specify this with the -m parameter and the name of the file containing the unit tests.

Running L8

The src/L8 contains instructions on how to run the TicTecToeEngine

Running coverage for L6

$ coverage3 run -m L6.datasorter_test

Note how, when invoking the script as a Python module you don't specify the .py extension. The name of the file is enough.

Running coverage for L4

$ coverage3 run -m L4.assignment_l4_a_d_c_s_carlosehdezrincon

Note how, when invoking the script as a Python module you don't specify the .py extension. The name of the file is enough.

Generating a report

After running the coverage report, we can then generate a report to the console:

$ coverage3 report

Or we can get a nicely formatted HTML instead:

$ coverage3 html

This will generate an htmlcov/index.html file that, when opened in a browser will have a colored report on coverage.