You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by xd...@apache.org on 2020/08/22 08:35:32 UTC
[airflow] branch master updated: Test exact match of Executor name
(#10465)
This is an automated email from the ASF dual-hosted git repository.
xddeng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/master by this push:
new 904c1d8 Test exact match of Executor name (#10465)
904c1d8 is described below
commit 904c1d825aa2f7eb5b1e3f01a3a7744860de7e68
Author: Kaxil Naik <ka...@gmail.com>
AuthorDate: Sat Aug 22 09:35:01 2020 +0100
Test exact match of Executor name (#10465)
Use `self.assertEqual` instead of `self.assertIn` to do an exact match of string name instead of partial match
---
tests/executors/test_executor_loader.py | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/tests/executors/test_executor_loader.py b/tests/executors/test_executor_loader.py
index 30bf03d..1a644b9 100644
--- a/tests/executors/test_executor_loader.py
+++ b/tests/executors/test_executor_loader.py
@@ -55,7 +55,7 @@ class TestExecutorLoader(unittest.TestCase):
}):
executor = ExecutorLoader.get_default_executor()
self.assertIsNotNone(executor)
- self.assertIn(executor_name, executor.__class__.__name__)
+ self.assertEqual(executor_name, executor.__class__.__name__)
@mock.patch("airflow.plugins_manager.plugins", [
FakePlugin()
@@ -67,7 +67,7 @@ class TestExecutorLoader(unittest.TestCase):
}):
executor = ExecutorLoader.get_default_executor()
self.assertIsNotNone(executor)
- self.assertIn("FakeExecutor", executor.__class__.__name__)
+ self.assertEqual("FakeExecutor", executor.__class__.__name__)
def test_should_support_custom_path(self):
with conf_vars({
@@ -75,4 +75,4 @@ class TestExecutorLoader(unittest.TestCase):
}):
executor = ExecutorLoader.get_default_executor()
self.assertIsNotNone(executor)
- self.assertIn("FakeExecutor", executor.__class__.__name__)
+ self.assertEqual("FakeExecutor", executor.__class__.__name__)