Skip to content

[BUG] Failing tests on MacOS related to lock-related EOExecutor tests #578

Open
@mlubej

Description

@mlubej

Describe the bug

Tests mentioned above fail on MacOS. Not sure if they already failed before or not. Probably not many people run this anyway.

To Reproduce

  1. Git gud job
  2. Git gud salary
  3. Git gud macbook
  4. Run eo-learn tests

Expected behavior

Passing tests

Environment

  • Python 3.10
  • pyenv venv environment
  • sh-py and eo-learn installed in edit mode (develop versions)

Stack trace or screenshots

Running pytest core/eolearn/tests/test_eoexecutor.py -k lock results in:

image

Desktop (please complete the following information):

  • OS: MacOS Ventura 13.2.1

Additional context

This might be related to the known issue of MacOS and Windows, where the multiprocessing spawn method has to be set to fork via:

import multiprocessing
multiprocessing.set_start_method('fork')

This method is the default on Linux, but not on Mac and probably not on Windows as well. This is what I usually have to do to make parallelization work in notebooks and such.

The mentioned tests also work if I set the method in the failing tests file to fork, but I'm not sure if that's the proper way to go about it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions