示例#1
0
文件: cli_test.py 项目: OculusVR/fig
 def test_project_name_from_environment(self):
     command = TopLevelCommand()
     name = 'namefromenv'
     with mock.patch.dict(os.environ):
         os.environ['FIG_PROJECT_NAME'] = name
         project_name = command.get_project_name(None)
     self.assertEquals(project_name, name)
示例#2
0
文件: cli_test.py 项目: zdexter/fig
 def test_project_name_from_environment(self):
     command = TopLevelCommand()
     name = 'namefromenv'
     with mock.patch.dict(os.environ):
         os.environ['FIG_PROJECT_NAME'] = name
         project_name = command.get_project_name(None)
     self.assertEquals(project_name, name)
示例#3
0
文件: cli_test.py 项目: OculusVR/fig
    def test_default_project_name(self):
        cwd = os.getcwd()

        try:
            os.chdir('tests/fixtures/simple-figfile')
            command = TopLevelCommand()
            project_name = command.get_project_name(command.get_config_path())
            self.assertEquals('simplefigfile', project_name)
        finally:
            os.chdir(cwd)
示例#4
0
文件: cli_test.py 项目: tristanz/fig
    def test_default_project_name(self):
        cwd = os.getcwd()

        try:
            os.chdir('tests/fixtures/simple-figfile')
            command = TopLevelCommand()
            project_name = command.get_project_name(command.get_config_path())
            self.assertEquals('simplefigfile', project_name)
        finally:
            os.chdir(cwd)
示例#5
0
文件: cli_test.py 项目: OculusVR/fig
 def test_project_name_with_explicit_project_name(self):
     command = TopLevelCommand()
     name = 'explicit-project-name'
     project_name = command.get_project_name(None, project_name=name)
     self.assertEquals('explicitprojectname', project_name)
示例#6
0
文件: cli_test.py 项目: OculusVR/fig
 def test_project_name_with_explicit_uppercase_base_dir(self):
     command = TopLevelCommand()
     command.base_dir = 'tests/fixtures/Simple-figfile'
     project_name = command.get_project_name(command.get_config_path())
     self.assertEquals('simplefigfile', project_name)
示例#7
0
文件: cli_test.py 项目: tristanz/fig
 def test_project_name_with_explicit_project_name(self):
     command = TopLevelCommand()
     name = 'explicit-project-name'
     project_name = command.get_project_name(None, project_name=name)
     self.assertEquals('explicitprojectname', project_name)
示例#8
0
文件: cli_test.py 项目: tristanz/fig
 def test_project_name_with_explicit_base_dir(self):
     command = TopLevelCommand()
     command.base_dir = 'tests/fixtures/simple-figfile'
     project_name = command.get_project_name(command.get_config_path())
     self.assertEquals('simplefigfile', project_name)