def test_create_core_default(): """Test `create_core` with factory defaults.""" with temporary_config() as cfgfile: # std factory params core = create_core(cfgfile.name) assert_is_instance(core, Core) assert_equal(core.auto_enable_auth, True)
def test_create_engine_non_default2(): """Test `create_engine` with several non-default arguments.""" with temporary_config() as cfgfile: engine = create_engine(cfgfile.name, can_submit=False, max_in_flight=1234) assert_equal(engine.can_submit, False) assert_equal(engine.max_in_flight, 1234)
def test_create_core_non_default(): """Test `create_core` with non-default arguments.""" with temporary_config() as cfgfile: # use a specific MatchMaker instance for equality testing mm = MatchMaker() core = create_core(cfgfile.name, matchmaker=mm) assert_equal(core.auto_enable_auth, True) assert_equal(core.matchmaker, mm)
def test_create_engine_with_core_options(): """Test `create_engine` with a mix of Engine and Core options.""" with temporary_config() as cfgfile: # use a specific MatchMaker instance for equality testing mm = MatchMaker() engine = create_engine(cfgfile.name, can_submit=False, matchmaker=mm, auto_enable_auth=False) assert_equal(engine.can_submit, False) assert_equal(engine._core.matchmaker, mm) assert_equal(engine._core.auto_enable_auth, False)
def test_create_engine_non_default1(): """Test `create_engine` with one non-default argument.""" with temporary_config() as cfgfile: engine = create_engine(cfgfile.name, can_submit=False) assert_equal(engine.can_submit, False)
def test_create_engine_default(): """Test `create_engine` with factory defaults.""" with temporary_config() as cfgfile: # std factory params engine = create_engine(cfgfile.name) assert_is_instance(engine, Engine)
def test_create_core_no_auto_enable_auth(): """Test `create_core` without the "auto enable" feature.""" with temporary_config() as cfgfile: # std factory params core = create_core(cfgfile.name, auto_enable_auth=False) assert_equal(core.auto_enable_auth, False)