示例#1
0
 def test_return_bash_if_empty(self):
     """Return bash if no key"""
     os.environ.pop('SHELL')
     self.assertTrue(
         tools._get_shell_profile_file_path().endswith(".profile"))
示例#2
0
 def test_can_override_zsh_with_SHELL(self):
     """Can return zsh profile if set"""
     os.environ['SHELL'] = '/bin/zsh'
     self.assertTrue(
         tools._get_shell_profile_file_path().endswith(".zprofile"))
示例#3
0
 def test_return_bash_if_nosense(self):
     """Return bash if content is garbage"""
     os.environ['SHELL'] = 'contain_nothing'
     self.assertTrue(
         tools._get_shell_profile_file_path().endswith(".profile"))
示例#4
0
 def test_return_shell_bash(self):
     """Default setup should change the bash profile"""
     self.assertTrue(
         tools._get_shell_profile_file_path().endswith(".profile"))
示例#5
0
 def test_return_bash_if_empty(self):
     """Return bash if no key"""
     os.environ.pop('SHELL')
     self.assertTrue(tools._get_shell_profile_file_path().endswith(".profile"))
示例#6
0
 def test_return_bash_if_nosense(self):
     """Return bash if content is garbage"""
     os.environ['SHELL'] = 'contain_nothing'
     self.assertTrue(tools._get_shell_profile_file_path().endswith(".profile"))
示例#7
0
 def test_can_override_zsh_with_SHELL(self):
     """Can return zsh profile if set"""
     os.environ['SHELL'] = '/bin/zsh'
     self.assertTrue(tools._get_shell_profile_file_path().endswith(".zprofile"))
示例#8
0
 def test_return_shell_bash(self):
     """Default setup should change the bash profile"""
     self.assertTrue(tools._get_shell_profile_file_path().endswith(".profile"))