コード例 #1
0
 def test_sleep2(self):
     t = time.time()
     with self.assertRaises(RuntimeError):
         utils.run_locally('sleep 20', timeout=1)
     ok(time.time() - t) < 1.2
コード例 #2
0
 def test_sleep2(self):
     t = time.time()
     with self.assertRaises(RuntimeError):
         utils.run_locally('sleep 20', timeout=1)
     ok(time.time() - t) < 1.2
コード例 #3
0
 def test_ls(self):
     expected = sorted(os.listdir('/'))
     ok(sorted(utils.run_locally('ls /').split())) == expected
コード例 #4
0
 def test_ls(self):
     expected = sorted(os.listdir('/'))
     ok(sorted(utils.run_locally('ls /').split())) == expected