@pytest.mark.parametrize('discrete', [True, False], ids=['discrete', 'continuous'])
@pytest.mark.parametrize('visual', [True, False], ids=['visual', 'vector'])
@pytest.mark.parametrize('rnn', [True, False], ids=['rnn', 'no_rnn'])
def test_policy_conversion(tmpdir, rnn, visual, discrete):
    tf.reset_default_graph()
    dummy_config = TrainerSettings(output_path=os.path.join(tmpdir, 'test'))
    policy = create_policy_mock(dummy_config, use_rnn=rnn, use_discrete=discrete, use_visual=visual)
    policy.save_model(1000)
    settings = SerializationSettings(policy.model_path, os.path.join(tmpdir, policy.brain.brain_name))
    export_policy_model(settings, policy.graph, policy.sess)
    assert os.path.isfile(os.path.join(tmpdir, 'test.nn'))
    assert (os.path.getsize(os.path.join(tmpdir, 'test.nn')) > 100)
@pytest.mark.parametrize('discrete', [True, False], ids=['discrete', 'continuous'])
@pytest.mark.parametrize('visual', [True, False], ids=['visual', 'vector'])
@pytest.mark.parametrize('rnn', [True, False], ids=['rnn', 'no_rnn'])
def test_policy_conversion(tmpdir, rnn, visual, discrete):
    tf.reset_default_graph()
    dummy_config = TrainerSettings(output_path=os.path.join(tmpdir, 'test'))
    policy = create_policy_mock(dummy_config, use_rnn=rnn, use_discrete=discrete, use_visual=visual)
    policy.save_model(1000)
    settings = SerializationSettings(policy.model_path, os.path.join(tmpdir, policy.brain.brain_name))
    export_policy_model(settings, policy.graph, policy.sess)
    assert os.path.isfile(os.path.join(tmpdir, 'test.nn'))
    assert (os.path.getsize(os.path.join(tmpdir, 'test.nn')) > 100)