Repository: ExaWorks/psij-python (language: python)

Issue:
Move batch-test executor to testing directory.
The batch-test executor is used to test the abstract classes for batch schedulers. It is only used by tests, hence, like the always-loads and never-loads executors, should belong in the tests directory.


Discussion / hints:

Fix patch:
diff --git a/src/psij-descriptors/core_descriptors.py b/src/psij-descriptors/core_descriptors.py
index 66c7ad6a..fd87ef12 100644
--- a/src/psij-descriptors/core_descriptors.py
+++ b/src/psij-descriptors/core_descriptors.py
@@ -3,9 +3,7 @@
 
 __PSI_J_EXECUTORS__ = [
     Descriptor(name='local', version=StrictVersion('0.0.1'),
-               cls='psij.executors.local.LocalJobExecutor'),
-    Descriptor(name='batch-test', version=StrictVersion('0.0.1'),
-               cls='psij.executors.batch._batch_test._TestJobExecutor')
+               cls='psij.executors.local.LocalJobExecutor')
 ]
 
 __PSI_J_LAUNCHERS__ = [


Test patch:
diff --git a/src/psij/executors/batch/_batch_test.py b/tests/plugins1/_batch_test/_batch_test.py
similarity index 100%
rename from src/psij/executors/batch/_batch_test.py
rename to tests/plugins1/_batch_test/_batch_test.py
diff --git a/src/psij/executors/batch/test/qdel b/tests/plugins1/_batch_test/test/qdel
similarity index 100%
rename from src/psij/executors/batch/test/qdel
rename to tests/plugins1/_batch_test/test/qdel
diff --git a/src/psij/executors/batch/test/qlib.py b/tests/plugins1/_batch_test/test/qlib.py
similarity index 100%
rename from src/psij/executors/batch/test/qlib.py
rename to tests/plugins1/_batch_test/test/qlib.py
diff --git a/src/psij/executors/batch/test/qrun b/tests/plugins1/_batch_test/test/qrun
similarity index 100%
rename from src/psij/executors/batch/test/qrun
rename to tests/plugins1/_batch_test/test/qrun
diff --git a/src/psij/executors/batch/test/qstat b/tests/plugins1/_batch_test/test/qstat
similarity index 100%
rename from src/psij/executors/batch/test/qstat
rename to tests/plugins1/_batch_test/test/qstat
diff --git a/src/psij/executors/batch/test/qsub b/tests/plugins1/_batch_test/test/qsub
similarity index 100%
rename from src/psij/executors/batch/test/qsub
rename to tests/plugins1/_batch_test/test/qsub
diff --git a/src/psij/executors/batch/test/test.mustache b/tests/plugins1/_batch_test/test/test.mustache
similarity index 100%
rename from src/psij/executors/batch/test/test.mustache
rename to tests/plugins1/_batch_test/test/test.mustache
diff --git a/tests/plugins1/psij-descriptors/descriptors.py b/tests/plugins1/psij-descriptors/descriptors.py
index 92fdb698..11f0266d 100644
--- a/tests/plugins1/psij-descriptors/descriptors.py
+++ b/tests/plugins1/psij-descriptors/descriptors.py
@@ -16,5 +16,9 @@
                cls='_test_plugins1._always_loads_executor.AlwaysLoadsExecutor'),
     # noop executor with an import of a package that does not exist
     Descriptor(name='_never_loads', version=StrictVersion('0.0.1'),
-               cls='_test_plugins1._never_loads_executor.NeverLoadsExecutor')
+               cls='_test_plugins1._never_loads_executor.NeverLoadsExecutor'),
+    # an executor that exercises some of the batch test stuff
+    Descriptor(name='batch-test', version=StrictVersion('0.0.1'),
+               cls='_batch_test._batch_test._TestJobExecutor')
+
 ]