TestSuite Maximum recursion limit reached.
조회 수: 2 (최근 30일)
이전 댓글 표시
Hi
I wrote a testSuite for my application. Unfortunately, there is a recursion occurring which I cannot explain. The image below depicts the folder structure I use.

The next lines of code is where I initiate the TestSuite. I assured that my current working directory is ./test.
% MainTest.m
import matlab.unittest.TestSuite
suiteFolder = TestSuite.fromFolder(pwd);
result = run(suiteFolder);
disp(result)
As an example below is the code which runs one test function.
% TestStage.m
function tests = TestStage
tests = functiontests(localfunctions);
function setupOnce(testCase)
testCase.TestData.origPath = pwd;
cd('../src')
function teardownOnce(testCase)
cd(testCase.TestData.origPath);
function testSmallStage(testCase)
verifyTrue(testCase, true);
I get the following error when I run the `MainTest.m`. However, the test finishes when I run `TestStage.m` on its own.
Warning: The following error was caught while executing 'matlab.unittest.internal.Teardownable' class destructor:
Maximum recursion limit of 500 reached.
Can you reproduce the error? Where is my mistake?
댓글 수: 0
답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Testing Frameworks에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!