def test_empty(self): """Verify 'demo' can be run in a working copy with no docs.""" os.mkdir(os.path.join(self.temp, '.mockvcs')) os.chdir(self.temp) self.assertIs(None, main([])) self.assertTrue(settings.REFORMAT) self.assertTrue(settings.CHECK_REF) self.assertTrue(settings.CHECK_CHILD_LINKS)
def test_options(self): """Verify 'demo' can be run with options.""" os.mkdir(os.path.join(self.temp, '.mockvcs')) os.chdir(self.temp) self.assertIs(None, main(['--no-reformat', '--no-ref-check', '--no-rlinks-check'])) self.assertFalse(settings.REFORMAT) self.assertFalse(settings.CHECK_REF) self.assertFalse(settings.CHECK_CHILD_LINKS)
def test_verbose_2(self): """Verify verbose level 2 can be set.""" self.assertIs(None, main(['-vv']))
def test_gui(self): """Verify 'demo --gui' launches the GUI.""" self.assertIs(None, main(['--gui']))
def test_main_custom_root(self): """Verify 'demo' can be provided a custom root path.""" os.chdir(self.temp) self.assertIs(None, main(['--project', '.']))
def test_main(self): """Verify 'demo' can be called.""" self.assertIs(None, main([]))
def test_verbose_5(self): """Verify verbose level 5 cannot be set.""" self.assertIs(None, main(['-vvvvv'])) self.assertEqual(4, common.VERBOSITY)