{ "info": { "author": "Gary Tyler", "author_email": "mail@garytyler.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Framework :: Pytest", "Intended Audience :: End Users/Desktop", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 2.7", "Topic :: Games/Entertainment :: Simulation", "Topic :: Multimedia", "Topic :: Multimedia :: Graphics", "Topic :: Multimedia :: Graphics :: 3D Modeling", "Topic :: Multimedia :: Graphics :: 3D Rendering", "Topic :: Software Development :: Testing" ], "description": "# maxpytest\n\n[![PyPI version](https://badge.fury.io/py/maxpytest.svg)](https://badge.fury.io/py/maxpytest) [![Build status](https://ci.appveyor.com/api/projects/status/eonytxoyfg9cs33v?svg=true)](https://ci.appveyor.com/project/garytyler/maxpytest-dbke3) [![codecov](https://codecov.io/gh/garytyler/maxpytest/branch/master/graph/badge.svg?token=JseFmmlQHm)](https://codecov.io/gh/garytyler/maxpytest) [![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/ambv/black)\n\n## Overview\n\nCommand line tool for a friendly testing workflow using the [Pytest](https://docs.pytest.org/en/latest/) framework in 3ds Max\n\n* Run tests with all 3ds Max Python APIs, including GUI/PySide2 libraries\n* Source dependencies from a [pipenv](https://pipenv.readthedocs.io/en/latest/) virtual environment\n* Automate a new 3ds Max/python session for each tests invocation\n\n## Setup\n\n### Install with pip\n\nInstall with pip using Python 2.7:\n\n```ps\npip install maxpytest\n```\n\n## Usage\n\nDue to the caching mechanism of python's import system and Pytest's design, changes made to test files (and any modules they import) will not be reflected in subsequent Pytest invocations _in the same python process_. This means ensuring that your changes are reflected requires a restart of the 3ds Max/python session.\n\nThe argument `-m/--max` directs `maxpytest` how to run your tests. For maxpytest to handle closing and relaunching 3ds Max automatically, [run your tests using MXSPyCOM](#Run-your-tests-using-MXSPyCOM). For a simple setup, or if targeting multiple 3ds Max versions, [run your tests directly with 3ds Max](#Run-your-tests-directly-with-3ds-Max). To use the first discovered method, [run your tests using the default run method](#Run-your-tests-using-the-default-run-method).\n\n### Including site-packages from a pipenv virtual environment\n\nIf the current working directory is a project root with an installed [pipenv](https://pipenv.readthedocs.io/en/latest/) virtual environment, that environment's site-packages are made available to the 3ds Max python environment running the tests. Overriding the current working directory with `--cwd` effects this behavior accordingly.\n\nIf no [pipenv](https://pipenv.readthedocs.io/en/latest/) virtual environment is discovered in the current working directory and the virtual environment includes a pytest package, that pytest package is used to run the tests. Otherwise maxpytest's pytest dependency is used.\n\nTo install pipenv, run from your project root:\n\n```ps\npip install pipenv\n```\n\nThen, setup a pipenv virtual environment:\n\n```ps\npipenv --python 2.7 install\n```\n\nAdd pytest to the virtual environment:\n\n```ps\npipenv install pytest\n```\n\n### Run your tests using MXSPyCOM\n\nWhen you run your tests with [MXSPyCOM](https://github.com/JeffHanna/MXSPyCOM), the closing and relaunching 3ds Max is handled automatically. Any unsaved work will trigger a prompt to save it before closing. For more about [MXSPyCOM](https://github.com/JeffHanna/MXSPyCOM) see the [wiki](https://github.com/JeffHanna/MXSPyCOM/wiki).\n\nTo invoke your tests, use `maxpytest -m [path to MXSPyCOM.exe] -py [pytest args]`, with Pytest args following `-py` or `--pytest` as the final command argument.\n\nFor example:\n\n```ps\n# Relaunch 3ds Max then invoke pytest from current working dir with verbose\nmaxpytest -m \"C:\\\\Program Files\\\\MXSPyCOM\\\\MXSPyCOM.exe\" -py -v .\n\n# Relaunch 3ds Max then invoke pytest in directory ./tests\nmaxpytest -m \"C:\\\\Program Files\\\\MXSPyCOM\\\\MXSPyCOM.exe\" -py tests/\n\n# Skip relaunch and just invoke pytest in directory ./tests\nmaxpytest -m \"C:\\\\Program Files\\\\MXSPyCOM\\\\MXSPyCOM.exe\" --no-restart -py tests/\n```\n\nTest results print to the 3ds Max Listener.\n\n### Run your tests directly with 3ds Max\n\nTo run tests in 3ds max without using MXSPyCOM, use `-m/--max` with the version year of the 3ds Max you wish to target, or a full path to 3dsmax.exe.\n\nFor example:\n\n```ps\n# Invoke pytest from current working dir in a new instance of 3ds Max 2019\nmaxpytest -m \"C:\\\\Program Files\\\\Autodesk\\\\3ds Max 2019\\\\3dsmax.exe\"\n\n# Invoke pytest from current working dir in a new instance of 3ds Max 2019\nmaxpytest -m 2019\n\n# Invoke pytest from tests/ in a new instance of 3dsMax 2016\nmaxpytest -m 2016 -py tests/ -v\n```\n\nTest results will print to the 3ds Max Listener.\n\n### Run your tests using the default run method\n\nIf `maxtest` is used without a `-m/--max` argument, maxpytest will search for MXSPyCOM.exe at `C:\\Program Files\\MXSPyCOM\\MXSPyCOM.exe`. If not found, the most recent version of 3ds Max installed on the system will be used.\n\n## Contact\n\nFor questions, support, or feature requests, please open an issue or reach out at mail@garytyler.com .", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/garytyler/maxpytest", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "maxpytest", "package_url": "https://pypi.org/project/maxpytest/", "platform": "", "project_url": "https://pypi.org/project/maxpytest/", "project_urls": { "Homepage": "https://github.com/garytyler/maxpytest" }, "release_url": "https://pypi.org/project/maxpytest/1.0.3/", "requires_dist": null, "requires_python": "~=2.7", "summary": "Command line utility for using the Pytest testing framework in 3ds Max", "version": "1.0.3" }, "last_serial": 4860966, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "b450780e66557ddf5f29c152b45f99f0", "sha256": "864e6b12f3d8e90d80e0d91b8733004d01b999a256e16e8e88346264e3523597" }, "downloads": -1, "filename": "maxpytest-1.0.0.tar.gz", "has_sig": false, "md5_digest": "b450780e66557ddf5f29c152b45f99f0", "packagetype": "sdist", "python_version": "source", "requires_python": "~=2.7", "size": 10917, "upload_time": "2018-09-19T01:01:21", "url": "https://files.pythonhosted.org/packages/02/22/4b5cc88d504d4cd9b5baa77d0f2dc02a1203cdf8cec27fa3edf50d351101/maxpytest-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "6a03ce48d7c3307c3b4cdf59cdb7af2a", "sha256": "b29554d1d6031efaf14027bda46dbcd903b7f7d32f9dedfe767d133ff957c0ec" }, "downloads": -1, "filename": "maxpytest-1.0.1.tar.gz", "has_sig": false, "md5_digest": "6a03ce48d7c3307c3b4cdf59cdb7af2a", "packagetype": "sdist", "python_version": "source", "requires_python": "~=2.7", "size": 11362, "upload_time": "2018-09-19T02:58:35", "url": "https://files.pythonhosted.org/packages/36/21/5fa26a55ce4dec892c9ad238cb9d8e7a6f62da639fb44519bffe19588f44/maxpytest-1.0.1.tar.gz" } ], "1.0.2": [ { "comment_text": "", "digests": { "md5": "45467a0a54fb6236ea45febe6ca11b7b", "sha256": "df734c1b7542da51e6c5469ac7c55f599c31eb85a7a0b8a69aba5da6f90b1f24" }, "downloads": -1, "filename": "maxpytest-1.0.2.tar.gz", "has_sig": false, "md5_digest": "45467a0a54fb6236ea45febe6ca11b7b", "packagetype": "sdist", "python_version": "source", "requires_python": "~=2.7", "size": 11759, "upload_time": "2018-09-27T22:50:10", "url": "https://files.pythonhosted.org/packages/b1/d4/89b0ffe6124c899ef1acdfde2caeebe36369d56c3bb2f07916c97054ac7c/maxpytest-1.0.2.tar.gz" } ], "1.0.3": [ { "comment_text": "", "digests": { "md5": "1ac0732b1c124581bd177b9f58521a1d", "sha256": "4923a799c09c327c00047fa27fe125dd7b57f0859afef57fcd582aaa7fcaf877" }, "downloads": -1, "filename": "maxpytest-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1ac0732b1c124581bd177b9f58521a1d", "packagetype": "sdist", "python_version": "source", "requires_python": "~=2.7", "size": 12234, "upload_time": "2019-02-24T13:22:27", "url": "https://files.pythonhosted.org/packages/79/97/025c4ef4824bb6dbf187cfb004a22e55296d8984a6404690715df9e0cb50/maxpytest-1.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "1ac0732b1c124581bd177b9f58521a1d", "sha256": "4923a799c09c327c00047fa27fe125dd7b57f0859afef57fcd582aaa7fcaf877" }, "downloads": -1, "filename": "maxpytest-1.0.3.tar.gz", "has_sig": false, "md5_digest": "1ac0732b1c124581bd177b9f58521a1d", "packagetype": "sdist", "python_version": "source", "requires_python": "~=2.7", "size": 12234, "upload_time": "2019-02-24T13:22:27", "url": "https://files.pythonhosted.org/packages/79/97/025c4ef4824bb6dbf187cfb004a22e55296d8984a6404690715df9e0cb50/maxpytest-1.0.3.tar.gz" } ] }