Example #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"))
Example #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"))
Example #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"))
Example #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"))
Example #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"))
Example #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"))
Example #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"))
Example #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"))