def test_log_file_writer(ex, tf):
    """
    Tests whether logdir is stored into the info dictionary when creating a new FileWriter object.
    """
    TEST_LOG_DIR = "/tmp/sacred_test1"
    TEST_LOG_DIR2 = "/tmp/sacred_test2"

    @ex.main
    @LogFileWriter(ex)
    def run_experiment(_run):
        assert _run.info.get("tensorflow", None) is None
        with tf.Session() as s:
            with LogFileWriter(ex):
                swr = tf.summary.FileWriter(logdir=TEST_LOG_DIR, graph=s.graph)
            assert swr is not None
            assert _run.info["tensorflow"]["logdirs"] == [TEST_LOG_DIR]
            tf.summary.FileWriter(TEST_LOG_DIR2, s.graph)
            assert _run.info["tensorflow"]["logdirs"] == [TEST_LOG_DIR, TEST_LOG_DIR2]

    ex.run()

    Tests whether logdir is stored into the info dictionary when creating a new FileWriter object.
    
tests/test_stflow/test_method_interception.py