Пример #1
0
 def test_paths_from_env(self, monkeypatch):
     monkeypatch.setenv("TRANSFORMER_INPUT_PATHS", """["/x/y", "a/b"]""")
     conf = read_config([])
     assert conf.input_paths == (Path("/x/y"), Path("a/b"))
Пример #2
0
 def test_merge_plugins_from_env_and_cli(self, monkeypatch):
     monkeypatch.setenv("TRANSFORMER_PLUGINS", """["a", "b.c.d"]""")
     conf = read_config(["-p", "e.f", "XXX", "--plugin", "g"])
     assert conf.plugins == ("a", "b.c.d", "e.f", "g")
Пример #3
0
 def test_plugins_from_cli(self):
     conf = read_config(["-p", "a", "XXX", "--plugin", "b.c.d"])
     assert conf.plugins == ("a", "b.c.d")
Пример #4
0
 def test_plugins_from_env(self, monkeypatch):
     monkeypatch.setenv("TRANSFORMER_PLUGINS", """["a", "b.c.d"]""")
     conf = read_config([])
     assert conf.plugins == ("a", "b.c.d")
Пример #5
0
 def test_paths_from_cli_overwrite_those_from_env(self, monkeypatch):
     monkeypatch.setenv("TRANSFORMER_INPUT_PATHS", """["/x/y", "a/b"]""")
     conf = read_config(["u/v/w"])
     assert conf.input_paths == (Path("u/v/w"), )
Пример #6
0
 def test_paths_from_cli(self):
     conf = read_config(["/x/y", "a/b"])
     assert conf.input_paths == (Path("/x/y"), Path("a/b"))