Skip to content

Latest commit

 

History

History
48 lines (29 loc) · 833 Bytes

README.md

File metadata and controls

48 lines (29 loc) · 833 Bytes

getting-started-pytesting-code

Code examples for presentation on introductory unit testing in Python using the pytest library

Quick start

  1. Get the code.

     $ git clone https://github.com/ftobia/getting-started-pytesting-code.git
     $ cd getting-started-pytesting
    
  2. Make a virtualenv.

     $ virtualenv env
    
  3. Activate your virtualenv.

     $ source env/bin/activate
     (env)$
    
  4. Install pytest and the sample code library.

     (env)$ pip install pytest
     (env)$ pip install -e .
    
  5. Run pytest

     (env)$ py.test
    
  6. Play around with the code.

Tags you can use

Jump to certain points in the code using git checkout {name-of-tag}.

Tags:

  • beginning
  • bunch
  • arbitrary-markers
  • chunkify
  • install
  • is_listy