tlasica commented on a change in pull request #115:
URL: https://github.com/apache/cassandra-dtest/pull/115#discussion_r564301868
##########
File path: meta_tests/dtest_config_test.py
##########
@@ -0,0 +1,121 @@
+import os
+from re import search
+from unittest import TestCase
+
+from dtest_config import DTestConfig
+from mock import Mock, patch
+from pytest import UsageError
+import ccmlib.repository
+import ccmlib.common
+
+
+def _mock_responses(responses, default_response=None):
+ return lambda input: responses[input] if input in responses else \
+ "%s/meta_tests/cassandra-dir-4.0-beta" % os.getcwd() if input ==
"--cassandra-dir" else default_response
+
+
+def _check_with_params(params):
+ config = Mock()
+ config.getoption.side_effect = _mock_responses(params)
+ config.getini.side_effect = _mock_responses({})
+
+ dTestConfig = DTestConfig()
+ dTestConfig.setup(config)
+ return dTestConfig
+
+
+def _check_with_params_expect(params, pattern):
Review comment:
this will pass if exception is not thrown, why actually it should be
thrown, correct
we should instead use:
```with pytest.raises(ValueError, match=r".* 123 .*"):```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]