Testing Extensions with Python

A shared folder with AI prompts and code snippets

From workspace: Nvidia

Team: Omniverse

Total snippets: 4

Nvidia

Testing Extensions with Python

4 snippets

Startup Test

[[test]] name = "startup" pythonTests.include = [] _startup_only_test = true # special flag to indicate that this is a startup test

An actual test code can look like this:

# NOTE: # omni.kit.test - python's standard library unittest module with additional wrapping to add support for async/await tests # For most things refer to the unittest docs: https://docs.python.org/3/library/unittest.html import...

Writing First Test

If your extension for instance is defined:

[[python.module]] name = "omni.foo"

Adding Extension Test: Build Scripts

If your extension’s premake5.lua file defines the extension project in usual way:

local ext = get_current_extension_info() project_ext (ext)

Nvidia - Testing Extensions with Python - AI Prompts & Code Snippets | Snippets AI