Exemple #1
0
 def test_increment_here(self):
     sio = io.StringIO()
     with contextlib.redirect_stdout(sio):
         with preserve_logger_level('system_query'):
             run_module('version_query', '-i', '.')
     self.assertEqual(sio.getvalue().rstrip(),
                      query_caller().increment(VersionComponent.Patch).to_str())
Exemple #2
0
 def test_query_caller(self):
     version = query_caller()
     _LOG.debug('caller: %s', version)
     self.assertIsInstance(version, Version)
Exemple #3
0
 def test_here(self):
     sio = io.StringIO()
     with contextlib.redirect_stdout(sio):
         run_module('version_query', '.')
     self.assertEqual(sio.getvalue().rstrip(), query_caller().to_str())
     self.assertEqual(sio.getvalue().rstrip(), query_version_str())