def test_quiet(self): c_dir = os.path.join(self.tdir, "c") assert False, os.listdir(self.rdir) modbuildout.upgrade_bootstrap(c_dir) cret = buildout.installed(c_dir, python=self.py_st) self.assertFalse("OUTPUT:" in cret["comment"], cret["comment"]) self.assertFalse("Log summary:" in cret["comment"], cret["comment"]) self.assertTrue(cret["result"], cret["comment"])
def test_quiet(self): c_dir = os.path.join(self.tdir, 'c') assert False, os.listdir(self.rdir) modbuildout.upgrade_bootstrap(c_dir) cret = buildout.installed(c_dir, python=self.py_st) self.assertFalse('OUTPUT:' in cret['comment'], cret['comment']) self.assertFalse('Log summary:' in cret['comment'], cret['comment']) self.assertTrue(cret['result'], cret['comment'])
def skip_test_upgrade_bootstrap(self): b_dir = os.path.join(self.tdir, 'b') bpy = os.path.join(b_dir, 'bootstrap.py') buildout.upgrade_bootstrap(b_dir) time1 = os.stat(bpy).st_mtime with salt.utils.fopen(bpy) as fic: data = fic.read() self.assertTrue('setdefaulttimeout(2)' in data) flag = os.path.join(b_dir, '.buildout', '2.updated_bootstrap') self.assertTrue(os.path.exists(flag)) buildout.upgrade_bootstrap(b_dir, buildout_ver=1) time2 = os.stat(bpy).st_mtime with salt.utils.fopen(bpy) as fic: data = fic.read() self.assertTrue('setdefaulttimeout(2)' in data) flag = os.path.join(b_dir, '.buildout', '1.updated_bootstrap') self.assertTrue(os.path.exists(flag)) buildout.upgrade_bootstrap(b_dir, buildout_ver=1) time3 = os.stat(bpy).st_mtime self.assertNotEqual(time2, time1) self.assertEqual(time2, time3)