(self, *new_args, **kwargs)
| 19 | self.env["SCRAPY_SETTINGS_MODULE"] = "tests.test_cmdline.settings" |
| 20 | |
| 21 | def _execute(self, *new_args, **kwargs): |
| 22 | encoding = sys.stdout.encoding or "utf-8" |
| 23 | args = (sys.executable, "-m", "scrapy.cmdline", *new_args) |
| 24 | proc = Popen(args, stdout=PIPE, stderr=PIPE, env=self.env, **kwargs) |
| 25 | comm = proc.communicate()[0].strip() |
| 26 | return comm.decode(encoding) |
| 27 | |
| 28 | def test_default_settings(self): |
| 29 | assert self._execute("settings", "--get", "TEST1") == "default" |
no outgoing calls