def testGetFullVersionUnexpected(self, p_mock): """Test unexpected exception case of get_full_version.""" p_mock.side_effect = RuntimeError self.assertTrue(get_full_version() == __version__ + ".x")
def testGetFullVersionPath(self, d_mock): """Test not isdir case of get_full_version.""" d_mock.return_value = False self.assertTrue(get_full_version() == __version__)
def testGetFullVersionSrc(self, p_mock): """Test subprocess exception case of get_full_version.""" p_mock.side_effect = FileNotFoundError self.assertTrue(get_full_version() == __version__ + ".src")
def testGetFullVersion(self): """Test typical version string response is coherent with package.""" self.assertTrue(get_full_version().startswith(__version__))