def test_automain_imported(ex):
    main_called = [False]

    with patch.object(sys, 'argv', ['test.py']):

        @ex.automain
        def foo():
            main_called[0] = True

        assert ex.commands in 'foo'
        assert ex.commands['foo'] == foo
        assert ex.default_command == 'foo'
        assert main_called[0] is False
dataset/ETHPy150Open IDSIA/sacred/tests/test_experiment.py/test_automain_imported/swapped operands of `in`