├── .gitignore ├── run.py ├── .travis.yml └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | *.pyc -------------------------------------------------------------------------------- /run.py: -------------------------------------------------------------------------------- 1 | from maya import standalone, cmds 2 | standalone.initialize() 3 | 4 | cmds.file(new=True, force=True) 5 | cube, _ = cmds.polyCube(name="testCube") 6 | print(cube) 7 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | matrix: 2 | include: 3 | - env: 4 | - VERSION=2013sp1 5 | - env: 6 | - VERSION=2013sp2 7 | - env: 8 | - VERSION=2014sp1 9 | - env: 10 | - VERSION=2014sp2 11 | - env: 12 | - VERSION=2014sp3 13 | - env: 14 | - VERSION=2014sp4 15 | - env: 16 | - VERSION=2015sp1 17 | - env: 18 | - VERSION=2015sp2 19 | - env: 20 | - VERSION=2015sp3 21 | - env: 22 | - VERSION=2015sp4 23 | - env: 24 | - VERSION=2015sp5 25 | - env: 26 | - VERSION=2015sp6 27 | - env: 28 | - VERSION=2016sp1 29 | - env: 30 | - VERSION=2017 31 | - env: 32 | - VERSION=2018 33 | 34 | language: python 35 | sudo: required 36 | dist: trusty 37 | 38 | services: 39 | - docker 40 | 41 | script: 42 | - docker run --rm 43 | -v $(pwd):/repo 44 | --workdir=/repo 45 | --entrypoint mayapy 46 | mottosso/maya:${VERSION} run.py 47 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 |

Maya Test

2 |


3 |

4 | 5 |

Run your Python script, in every version of Maya.

6 | 7 |
8 | 9 | ### Usage 10 | 11 | The goal of this project is comparing the response of a single Python script in all current versions of Maya. 12 | 13 | 1. [Edit `run.py`](https://github.com/mottosso/maya-test/edit/master/run.py) 14 | 2. See results [here](https://travis-ci.org/mottosso/maya-test) 15 | 16 | ### Examples 17 | 18 | I want to know whether, in each version of Maya.. 19 | 20 | - [Is this workaround consistent?](https://github.com/mottosso/maya-test/pull/1) 21 | - [Does this bug occur?](https://github.com/mottosso/maya-test/pull/1) 22 | - [What is the result of `cmds.about(version=True)`?](https://github.com/mottosso/maya-test/pull/2) 23 | - ... 24 | 25 | #### Test with Nose 26 | 27 | Use the nose testing framework for a more complete test coverage. 28 | 29 | ```python 30 | def test_case1(): 31 | assert True 32 | 33 | def test_case2(): 34 | assert False 35 | ``` 36 | 37 | 1. [Edit `.travis.yml`](https://github.com/mottosso/maya-test/edit/master/.travis.yml) 38 | 2. Replace `mottosso/maya:${VERSION} run.py`
39 | with `mottosso/maya:${VERSION} -m nose.__main__ --verbose run.py` 40 | 41 | #### Speed up testing 42 | 43 | Running the test in every version of Maya takes >30 mins. You can iterate faster by removing versions you aren't interested in. 44 | 45 | ```yml 46 | matrix: 47 | include: 48 | # - env: 49 | # - VERSION=2013sp1 50 | # - env: 51 | # - VERSION=2013sp2 52 | - env: 53 | - VERSION=2014sp1 54 | - env: 55 | - VERSION=2014sp2 56 | ``` 57 | 58 | 1. [Edit `.travis.yml`](https://github.com/mottosso/maya-test/edit/master/.travis.yml) 59 | 2. Remove versions 60 | --------------------------------------------------------------------------------