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())
def test_query_caller(self): version = query_caller() _LOG.debug('caller: %s', version) self.assertIsInstance(version, Version)
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())