k-rus commented on a change in pull request #152:
URL: https://github.com/apache/cassandra-dtest/pull/152#discussion_r702710645



##########
File path: conftest.py
##########
@@ -545,53 +544,46 @@ def cassandra_dir_and_version(config):
     return cassandra_dir, cassandra_version
 
 
-def has_mark(item, mark):
+def _is_skippable(item, mark, skip_marked, skip_non_marked):
     if item.get_closest_marker(mark) is not None:
-        return True
-    else:
-        for item_module in inspect.getmembers(item.module, inspect.isclass):
-            if hasattr(item_module[1], "pytestmark"):
-                mark_names = [m.name for m in item_module[1].pytestmark]
-                if mark in mark_names:
-                    return True
-
-        return False
-
-
-def _is_skippable(item, mark, include_marked, include_other):
-    if has_mark(item, mark):
-        if include_marked:
-            return False
-        else:
-            logger.info("SKIP: Skipping %s because it is marked with %s" % 
(item, mark))
+        if skip_marked:
+            logger.info(
+                "SKIP: Skipping %s because it is marked with %s" % (item, 
mark))
             return True
-    else:
-        if include_other:
-            return False
         else:
-            logger.info("SKIP: Skipping %s because it is not marked with %s" % 
(item, mark))
+            return False
+    else:
+        if skip_non_marked:
+            logger.info(
+                "SKIP: Skipping %s because it is not marked with %s" % (item, 
mark))
             return True
+        else:
+            return False
 
 
-def is_skippable(item,
-                 include_upgrade_tests,
-                 include_non_upgrade_tests,
-                 include_resource_intensive_tests,
-                 include_non_resource_intensive_tests,
-                 include_vnodes_tests,
-                 include_no_vnodes_tests,
-                 include_no_offheap_memtables_tests):
-
-    skippable = False
+class SkipConditions:

Review comment:
       Thank you for the suggestion with the patch. Looks nice. I plan to 
incorporate it into the patch.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to