示例#1
0
文件: test_cli.py 项目: silas/rock
    def test_config_yaml(self):
        import yaml

        cli.config(Args(), ["--format=yaml"])
        data1 = yaml.safe_load(self.stdout.getvalue().strip().replace(helper.ROOT_PATH, "<ROOT>"))
        data2 = yaml.safe_load(config_file("data.json"))
        self.assertEqual(data1, data2)
示例#2
0
 def test_config_yaml(self):
     import yaml
     cli.config(Args(), ['--format=yaml'])
     data1 = yaml.safe_load(self.stdout.getvalue().strip().replace(
         helper.ROOT_PATH, '<ROOT>'))
     data2 = yaml.safe_load(config_file('data.json'))
     self.assertEqual(data1, data2)
示例#3
0
文件: test_cli.py 项目: silas/rock
    def test_config_json(self):
        import json

        cli.config(Args(), ["--format=json"])
        data1 = json.loads(self.stdout.getvalue().strip().replace(helper.ROOT_PATH, "<ROOT>"))
        data2 = json.loads(config_file("data.json"))
        self.assertEqual(data1, data2)
示例#4
0
 def test_config_json(self):
     import json
     cli.config(Args(), ['--format=json'])
     data1 = json.loads(self.stdout.getvalue().strip().replace(
         helper.ROOT_PATH, '<ROOT>'))
     data2 = json.loads(config_file('data.json'))
     self.assertEqual(data1, data2)