constants.py 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. # Licensed to the Apache Software Foundation (ASF) under one
  2. # or more contributor license agreements. See the NOTICE file
  3. # distributed with this work for additional information
  4. # regarding copyright ownership. The ASF licenses this file
  5. # to you under the Apache License, Version 2.0 (the
  6. # "License"); you may not use this file except in compliance
  7. # with the License. You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing,
  12. # software distributed under the License is distributed on an
  13. # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
  14. # KIND, either express or implied. See the License for the
  15. # specific language governing permissions and limitations
  16. # under the License.
  17. """Constants variables for test module."""
  18. import os
  19. # Record some task without example in directory `example`. Some of them maybe can not write example,
  20. # but most of them just without adding by mistake, and we should add it later.
  21. task_without_example = {
  22. "sql",
  23. "http",
  24. "sub_process",
  25. "python",
  26. "procedure",
  27. }
  28. # The examples ignore test to run it. Those examples could not be run directly cause it need other
  29. # support like resource files, data source and etc. But we should try to run them later for more coverage
  30. ignore_exec_examples = {
  31. "task_datax_example",
  32. "task_flink_example",
  33. "task_map_reduce_example",
  34. "task_spark_example",
  35. }
  36. # pydolphinscheduler environment home
  37. ENV_PYDS_HOME = "PYDS_HOME"
  38. # whether in dev mode, if true we will add or remove some tests. Or make be and more detail infos when
  39. # test failed.
  40. DEV_MODE = str(
  41. os.environ.get("PY_DOLPHINSCHEDULER_DEV_MODE", False)
  42. ).strip().lower() in {"true", "t", "1"}