#244 PR: Set multiprocessing ORIGINAL_DIR at startup

Open Quentin Peter impact27

No flags found

Use flags to group coverage reports by test type, project and/or folders.
Then setup custom commit statuses and notifications for each flag.

e.g., #unittest #integration

#production #enterprise

#frontend #backend

Learn more about Codecov Flags here.

Showing 1 of 1 files from the diff.

@@ -522,14 +522,22 @@
Loading
522 522
            for arg in shlex.split(args):
523 523
                sys.argv.append(arg)
524 524
        if wdir is not None:
525 -
            try:
526 -
                wdir = wdir.decode('utf-8')
527 -
            except (UnicodeError, TypeError, AttributeError):
528 -
                # UnicodeError, TypeError --> eventually raised in Python 2
529 -
                # AttributeError --> systematically raised in Python 3
530 -
                pass
525 +
            if PY2:
526 +
                try:
527 +
                    wdir = wdir.decode('utf-8')
528 +
                except (UnicodeError, TypeError):
529 +
                    # UnicodeError, TypeError --> eventually raised in Python 2
530 +
                    pass
531 531
            if os.path.isdir(wdir):
532 532
                os.chdir(wdir)
533 +
                # See https://github.com/spyder-ide/spyder/issues/13632
534 +
                if "multiprocessing.process" in sys.modules:
535 +
                    try:
536 +
                        import multiprocessing.process
537 +
                        multiprocessing.process.ORIGINAL_DIR = os.path.abspath(
538 +
                            wdir)
539 +
                    except Exception:
540 +
                        pass
533 541
            else:
534 542
                _print("Working directory {} doesn't exist.\n".format(wdir))
535 543

Learn more Showing 1 files with coverage changes found.

Changes in spyder_kernels/utils/nsview.py
+2
+1
Loading file...
Files Coverage
spyder_kernels -0.14% 56.78%
Project Totals (22 files) 56.78%
Loading