Skip to content

Conversation

@drewsteinacher
Copy link
Owner

Bug fix: MonitorMap

MonitorMap now works properly with Association:

In[465]:= MonitorMap[foo, <|"A" -> 1, "B" -> 2, "C" -> 3|>]

Out[465]= <|"A" -> foo[1], "B" -> foo[2], "C" -> foo[3]|>

New: MonitorMapIndexed

This is sometimes very useful:

In[466]:= MonitorMapIndexed[foo, CharacterRange["A", "E"]]

Out[466]= {foo["A", {1}], foo["B", {2}], foo["C", {3}], foo["D", {4}], foo["E", {5}]}

It also works with Association:

In[467]:= MonitorMapIndexed[foo, <|"A" -> 1, "B" -> 2, "C" -> 3|>]

Out[467]= <|"A" -> foo[1, {Key["A"]}], "B" -> foo[2, {Key["B"]}], "C" -> foo[3, {Key["C"]}]|>

New: MonitorTestReport

Running large test suites can be painful, especially when you have no idea how long they will run.
With MonitorTestReport, you can monitor the progress of a test suite with little effort:

MonitorTestReport[
 {
  VerificationTest[Pause[1]; 1, 1],
  VerificationTest[Pause[2]; 2, 2],
  VerificationTest[Pause[3]; 3, 3]
  }
 ]

image

In the future, I'll look into showing the current Test ID or index, as well as how many have failed, succeeded, etc..

Test files can also be run with this function:

MonitorTestReport["SimpleTestSuite.wlt"]

This will be used in MonitorTestReport.
…n Association

Also properly support arbitrary heads (treat like List and then Apply the correct head)
The tests added must have all passing tests inside them, otherwise TestReport counts "sub-tests" as part of the main suite, for whatever reason (so intentionally failing tests would cause inaccurate results).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants