Custom Entities and secondary roots with mockgun in TankTestBase

Loving the pytest unit testing support in tk-toolchain!

The README file in the tk-toolchain repo is a great start (thank you) but it would be helpful to link “exemplary” test directories in the code base. IOW which breadcrumb trail should we best start with?

Other than that I’m trying out adding a secondary root and using a custom schema.

Thanks so much for the time saved,
Rhea

4 Likes

Found setup_multi_root method and it’s been off to the races!

Created a “mock perforce python” to compliment mockgun.

The other bits that are making this sing for vscode are

  • a power shell script to prep and run pytest
  • a conditional block which initializes remote debug at the top of the test_xxx.py file

Really speeds toolkit dev.

The intro to toolkit programming would benefit from these topics:

  • toolchain unit test
  • remote debug
  • basic use of mockgun
3 Likes

Something handy for tk-toolchain how-can-i-install-tk-toolchain is mentioning the need to do

pip install pyside

within the virtualenv used for testing if you’re doing any testing related to Qt/PySide.

2 Likes