Skip to content

bommerio/f360mock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

f360mock

Mocking support for Python Fusion 360 tests

Before you use this, you should link or copy the Fusion 360 API files into your project path.

  • Find the API definitions:

Mac OS: ~/Library/Application\ Support/Autodesk/webdeploy/production/<hash>/Api/Python/packages/adsk
Windows: <User Directory>\AppData\Local\Autodesk\webdeploy\production\<hash>\Api\Python\packages\adsk

Look for the hash where the above directory contains (_core|_fusion|_cam).so (Mac), or (_core|_cam|_fusion).pyd (Windows)

  • Create a shortcut or link into your project:
ln –s ~/Library/Application\ Support/Autodesk/webdeploy/production/<hash>/Api/Python/packages/adsk <add-in folder>/adsk-lib
  • Add API folder to test/init.py:
import sys
import os
sys.path.append(os.path.abspath(’addin-path'))
sys.path.append(os.path.abspath('adsk-lib/defs'))
  • Run tests by navigating to your project root (which contains your add-in folder, and test folder) and running:
python -m unittest discover -s test -t .

About

Mocking support for Fusion 360 tests

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages