Python Tests Ensuring the Interface Project Manager Uses Exists and Signature Matches (#7552)

* Added tests in python to ensure interfaces used by PM exist and have the expected signature

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

* Fix crash if there is python error but no redirected output from python

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

* Add new line to end of tests file

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

* Initialize python bindings error count variable in if statement

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

* Call len() instead of __len__

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>

* enable disabled repo tests

Signed-off-by: nggieber <52797929+AMZN-nggieber@users.noreply.github.com>
This commit is contained in:
AMZN-nggieber
2022-02-11 18:50:29 -08:00
committed by GitHub
parent 47a6948a97
commit 96f9841ced
3 changed files with 423 additions and 9 deletions
@@ -1356,11 +1356,18 @@ namespace O3DE::ProjectManager
IPythonBindings::ErrorPair PythonBindings::GetErrorPair()
{
AZStd::string detailedString = m_pythonErrorStrings.size() == 1
? ""
: AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string(""));
if (const size_t errorSize = m_pythonErrorStrings.size())
{
AZStd::string detailedString =
errorSize == 1 ? "" : AZStd::accumulate(m_pythonErrorStrings.begin(), m_pythonErrorStrings.end(), AZStd::string(""));
return IPythonBindings::ErrorPair(m_pythonErrorStrings.front(), detailedString);
return IPythonBindings::ErrorPair(m_pythonErrorStrings.front(), detailedString);
}
// If no error was found
else
{
return IPythonBindings::ErrorPair(AZStd::string("Unknown Python Bindings Error"), AZStd::string(""));
}
}
void PythonBindings::AddErrorString(AZStd::string errorString)