Jump to content

Unit Testing/Pytest

From Wikiversity
Pytest logo
Pytest logo

Pytest is a Python programming language test automation framework. Test automation is the use of software separate from the software being tested to control the execution of tests and the comparison of actual outcomes with predicted outcomes.[1] Pytest uses simple assertion statements to test software accuracy.[2]

Readings

[edit | edit source]
  1. Wikipedia: Test automation

Multimedia

[edit | edit source]
  1. YouTube: Python Unit Testing With PyTest
  2. YouTube: Code Coverage Tutorial with Python

Activities

[edit | edit source]
  1. Install Pytest
  2. Create an assert Test
  3. Create a unittest Test
  4. Test Input
  5. Test Output
  6. Test Exceptions
  7. View Test Coverage

See Also

[edit | edit source]

References

[edit | edit source]