| Conditions | 4 |
| Total Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | """ |
||
| 21 | def pytest_sessionstart(self): |
||
| 22 | import maya.standalone |
||
| 23 | maya.standalone.initialize() |
||
| 24 | |||
| 25 | # If testing a maya module make sure PYTHONPATH and sys.path are |
||
| 26 | # identical |
||
| 27 | realsyspath = [os.path.realpath(path) for path in sys.path] |
||
| 28 | pythonpath = os.environ.get('PYTHONPATH', '') |
||
| 29 | for p in pythonpath.split(os.pathsep): |
||
| 30 | p = os.path.realpath(p) |
||
| 31 | if p not in realsyspath: |
||
| 32 | sys.path.insert(0, p) |
||
| 33 | |||
| 49 |