# Path: studio/fs_tracker.py
# STUDIOML_EXPERIMENT = 'STUDIOML_EXPERIMENT'
# STUDIOML_HOME = 'STUDIOML_HOME'
# STUDIOML_ARTIFACT_MAPPING = 'STUDIOML_ARTIFACT_MAPPING'
# def get_experiment_key():
# def get_studio_home():
# def setup_experiment(env, experiment, clean=True):
# def get_artifact(tag):
# def get_artifacts():
# def get_model_directory(experiment_name=None):
# def get_artifact_cache(tag, experiment_name=None):
# def get_blob_cache(blobkey):
# def get_model_directory(experiment_name=None):
# def _get_artifact_mapping_path(experiment_name=None):
# def _get_experiment_key(experiment):
# def _setup_model_directory(experiment_name, clean=False):
# def get_queue_directory():
# def get_tensorboard_dir(experiment_name=None):


import unittest
import os
from studio import fs_tracker



class StudioLoggingTest(unittest.TestCase):

    def test_get_model_directory_args(self):
        experimentName = 'testExperiment'
        modelDir = fs_tracker.get_model_directory(experimentName)
        self.assertTrue(
            modelDir == os.path.join(
                os.path.expanduser('~'),
                '.studioml/experiments/testExperiment/modeldir'))

    def test_get_model_directory_noargs(self):
        testExperiment = 'testExperiment'
        testPath = os.path.join(
            os.path.expanduser('~'),
            '.studioml/experiments',
            testExperiment, 'modeldir')

        os.environ['STUDIOML_EXPERIMENT'] = testExperiment

# Path: studio/fs_tracker.py
# STUDIOML_EXPERIMENT = 'STUDIOML_EXPERIMENT'
# STUDIOML_HOME = 'STUDIOML_HOME'
# STUDIOML_ARTIFACT_MAPPING = 'STUDIOML_ARTIFACT_MAPPING'
# def get_experiment_key():
# def get_studio_home():
# def setup_experiment(env, experiment, clean=True):
# def get_artifact(tag):
# def get_artifacts():
# def get_model_directory(experiment_name=None):
# def get_artifact_cache(tag, experiment_name=None):
# def get_blob_cache(blobkey):
# def get_model_directory(experiment_name=None):
# def _get_artifact_mapping_path(experiment_name=None):
# def _get_experiment_key(experiment):
# def _setup_model_directory(experiment_name, clean=False):
# def get_queue_directory():
# def get_tensorboard_dir(experiment_name=None):


# Path: tests/fs_tracker_test.py
import unittest
import os
from studio import fs_tracker




class StudioLoggingTest(unittest.TestCase):

    def test_get_model_directory_args(self):
        experimentName = 'testExperiment'
        modelDir = fs_tracker.get_model_directory(experimentName)
        self.assertTrue(
            modelDir == os.path.join(
                os.path.expanduser('~'),
                '.studioml/experiments/testExperiment/modeldir'))

    def test_get_model_directory_noargs(self):
        testExperiment = 'testExperiment'
        testPath = os.path.join(
            os.path.expanduser('~'),
            '.studioml/experiments',
            testExperiment, 'modeldir')

        os.environ['STUDIOML_EXPERIMENT'] = testExperiment

        self.assertTrue(testPath == fs_tracker.get_model_directory())