Skip to content

Commit

Permalink
Be a little more lenient on what constitutes a test case entrypoint (#…
Browse files Browse the repository at this point in the history
…215)

Also allow "container" (e,g., classes) names to end with "Test." There
are other testing framework derivatives in Python that allow for this,
apparently.
  • Loading branch information
khatchad authored Jul 24, 2024
1 parent d77c8b4 commit b8eccd0
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ public static boolean isPytestCase(IClass klass) {
IClass container = dmb.getContainer();
String containerName = container.getReference().getName().getClassName().toString();

if (containerName.startsWith("Test") && container instanceof PythonClass) {
if ((containerName.startsWith("Test") || containerName.endsWith("Test"))
&& container instanceof PythonClass) {
// It's a test class.
PythonClass containerClass = (PythonClass) container;

Expand Down

0 comments on commit b8eccd0

Please sign in to comment.