예제 #1
0
 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)
예제 #2
0
 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)
예제 #3
0
 def test_verbose_2(self):
     """Verify verbose level 2 can be set."""
     self.assertIs(None, main(['-vv']))
예제 #4
0
 def test_gui(self):
     """Verify 'demo --gui' launches the GUI."""
     self.assertIs(None, main(['--gui']))
예제 #5
0
 def test_main_custom_root(self):
     """Verify 'demo' can be provided a custom root path."""
     os.chdir(self.temp)
     self.assertIs(None, main(['--project', '.']))
예제 #6
0
 def test_main(self):
     """Verify 'demo' can be called."""
     self.assertIs(None, main([]))
예제 #7
0
 def test_verbose_5(self):
     """Verify verbose level 5 cannot be set."""
     self.assertIs(None, main(['-vvvvv']))
     self.assertEqual(4, common.VERBOSITY)