Skip to content

Latest commit

 

History

History
31 lines (20 loc) · 843 Bytes

README.md

File metadata and controls

31 lines (20 loc) · 843 Bytes

Unit Testing Pulumi programs in Python

An example of writing mock-based unit tests with both infrastructure definition and tests written in Python. The example uses the unittest test framework to define and run the tests.

Running the tests

  1. Create a Python virtualenv, activate it, and install dependencies:

    $ python3 -m venv venv
    $ source venv/bin/activate
    $ pip3 install -r requirements.txt
  2. Run the tests:

    $ python -m unittest
    
    ------------------------------------------------------------
    Ran 2 tests in 0.004s
    
    OK
    

Further steps

Learn more about testing Pulumi programs: