示例#1
0
文件: run.py 项目: MartinThoma/apidoc
    def run_dry_run(self):
        try:
            sources = self._get_sources()
        except:
            pass

        print(json_repr(sources))
示例#2
0
    def run_dry_run(self):
        try:
            sources = self._get_sources()
        except:
            pass

        print(json_repr(sources))
示例#3
0
    def main(self):
        """Run the command
        """
        sourceService = SourceService()
        sourceFactory = SourceFactory()

        config = self.get_config()
        sources = sourceFactory.create_from_config(config)
        sourceService.validate(sources)

        print(json_repr(sources))
示例#4
0
 def test_json_repr__None(self):
     self.assertEqual('null', json_repr(None))
示例#5
0
 def test_json_repr__ObjectEnum(self):
     self.assertEqual('"a"', json_repr(objectEnum.a))
示例#6
0
 def test_json_repr__ObjectOher(self):
     self.assertIn('proxy(', json_repr(type("")))
示例#7
0
 def test_json_repr__Tupple(self):
     self.assertEqual('[1, 2]', json_repr((1, 2)))
示例#8
0
 def test_json_repr__ObjectDiff(self):
     self.assertIn('"b": 1', json_repr(objectDict()))
     self.assertIn('"c": 2', json_repr(objectDict()))
示例#9
0
 def test_json_repr__Dict(self):
     self.assertIn('"a": 1', json_repr({"b": 2, "a": 1}))
     self.assertIn('"b": 2', json_repr({"b": 2, "a": 1}))
示例#10
0
 def test_json_repr__List(self):
     self.assertEqual('[1, 2]', json_repr([1, 2]))
示例#11
0
 def test_json_repr__String(self):
     self.assertEqual('"foo\\"bar"', json_repr('foo"bar'))
示例#12
0
 def test_json_repr__String(self):
     self.assertEqual('"foo\\"bar"', json_repr('foo"bar'))
示例#13
0
 def test_json_repr__None(self):
     self.assertEqual('null', json_repr(None))
示例#14
0
 def test_json_repr__Dict(self):
     self.assertIn('"a": 1', json_repr({"b": 2, "a": 1}))
     self.assertIn('"b": 2', json_repr({"b": 2, "a": 1}))
示例#15
0
 def test_json_repr__ObjectOher(self):
     self.assertIn('proxy(', json_repr(type("")))
示例#16
0
 def test_json_repr__ObjectEnum(self):
     self.assertEqual('"a"', json_repr(objectEnum.a))
示例#17
0
 def test_json_repr__ObjectDiff(self):
     self.assertIn('"b": 1', json_repr(objectDict()))
     self.assertIn('"c": 2', json_repr(objectDict()))
示例#18
0
 def test_json_repr__Tupple(self):
     self.assertEqual('[1, 2]', json_repr((1, 2)))
示例#19
0
 def test_json_repr__List(self):
     self.assertEqual('[1, 2]', json_repr([1, 2]))
示例#20
0
 def test_json_repr__Number(self):
     self.assertEqual('1.2', json_repr(1.2))
示例#21
0
 def test_json_repr__Number(self):
     self.assertEqual('1.2', json_repr(1.2))