Exemplo n.º 1
0
def test_existing_command():
    cmd = which('date')
    assert cmd
    assert os.path.exists(cmd)
    assert os.access(cmd, os.F_OK | os.X_OK)
    assert not os.path.isdir(cmd)
Exemplo n.º 2
0
def test_non_existing_command():
    assert which('stringthatisntashellcommand') is None
Exemplo n.º 3
0
 def test_non_existing_command(self):
     self.assertFalse(
         which('stringthatisntashellcommand')
     )
Exemplo n.º 4
0
 def test_existing_command(self):
     self.assertTrue(
         which('cookiecutter')
     )
Exemplo n.º 5
0
 def test_non_existing_command(self):
     self.assertFalse(which('stringthatisntashellcommand'))
Exemplo n.º 6
0
 def test_existing_command(self):
     self.assertTrue(which('cookiecutter'))
Exemplo n.º 7
0
def test_existing_command():
    assert which('cookiecutter')