def nose_test(module=None, extraArgs=None, pymelDir=None):
    """
    Run pymel unittests / doctests
    """
    if pymelDir:
        os.chdir(pymelDir)
            
    os.environ['MAYA_PSEUDOTRANS_MODE']='5'
    os.environ['MAYA_PSEUDOTRANS_VALUE']=','
    
    noseKwArgs={}
    noseArgv = "dummyArg0 --with-doctest -vv".split()
    if module is None:
        #module = 'pymel' # if you don't set a module, nose will search the cwd
        excludes = r'''^windows
                    \Wall\.py$
                    ^tools
                    ^example1
                    ^testing
                    ^eclipseDebug
                    ^pmcmds
                    ^testPa
                    ^maya
                    ^maintenance
                    ^pymel_test
                    ^TestPymel
                    ^testPassContribution$'''.split()

        # default inGui to false - if we are in gui, we should be able to query
        # (definitively) that we are, but same may not be true from command line
        inGui = False
        try:
            import maya.cmds
            inGui = not maya.cmds.about(batch=1)
        except Exception: pass

        # if we're not in gui mode, disable the gui tests
        if not inGui:
            excludes.extend('^test_uitypes ^test_windows'.split())
         
        noseArgv += ['--exclude', '|'.join( [ x % '(%s)' for x in excludes ] )  ]
           
    if inspect.ismodule(module):
        noseKwArgs['module']=module
    elif module:
        noseArgv.append(module)
    if extraArgs is not None:
        noseArgv.extend(extraArgs)
    noseKwArgs['argv'] = noseArgv
    
    with DocTestPatcher():
        print noseKwArgs
        nose.main( **noseKwArgs)
dataset/ETHPy150Open CountZer0/PipelineConstructionSet/python/maya/site-packages/pymel-1.0.3/tests/pymel_test.py/nose_test/swapped operands of `%`