Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))
Ejemplo n.º 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"))