Пример #1
0
    def test_version(self):
        quickstart._input = self._input

        with set_args('molostart', '--version') as out:
            try:
                quickstart.main()
            except SystemExit:
                pass
        output = out[0].read().strip()
        self.assertEqual(output, __version__)
Пример #2
0
    def test_version(self):
        quickstart._input = self._input

        with set_args('molostart', '--version') as out:
            try:
                quickstart.main()
            except SystemExit:
                pass
        output = out[0].read().strip()
        self.assertEqual(output, __version__)
Пример #3
0
    def test_codeworks(self):
        quickstart._input = self._input

        with set_args('molostart'):
            quickstart.main()

        result = os.listdir(self.tempdir)
        result.sort()
        self.assertEqual(result, ['Makefile', 'loadtest.py', 'molotov.json'])

        os.chdir(self.tempdir)
        with set_args('molotov', '-cxv', '--max-runs', '1'):
            try:
                run.main()
            except SystemExit:
                pass
Пример #4
0
    def test_codeworks(self):
        quickstart._input = self._input

        with set_args("molostart"):
            quickstart.main()

        result = os.listdir(self.location)
        result.sort()
        self.assertEqual(result, ["Makefile", "loadtest.py", "molotov.json"])

        os.chdir(self.location)
        with set_args("molotov", "-cxv", "--max-runs", "1"):
            try:
                run.main()
            except SystemExit:
                pass
Пример #5
0
    def test_codeworks(self):
        quickstart._input = self._input

        with set_args('molostart'):
            quickstart.main()

        result = os.listdir(self.location)
        result.sort()
        self.assertEqual(result, ['Makefile', 'loadtest.py', 'molotov.json'])

        os.chdir(self.location)
        with set_args('molotov', '-cxv', '--max-runs', '1'):
            try:
                run.main()
            except SystemExit:
                pass
Пример #6
0
    def test_generate(self):
        quickstart._input = self._input

        with set_args('molostart'):
            quickstart.main()

        result = os.listdir(self.tempdir)
        result.sort()
        self.assertEqual(result, ['Makefile', 'loadtest.py', 'molotov.json'])

        # second runs stops
        with set_args('molostart'):
            try:
                quickstart.main()
                raise AssertionError()
            except SystemExit:
                pass
Пример #7
0
    def test_generate(self):
        quickstart._input = self._input

        with set_args("molostart"):
            quickstart.main()

        result = os.listdir(self.location)
        result.sort()
        self.assertEqual(result, ["Makefile", "loadtest.py", "molotov.json"])

        # second runs stops
        with set_args("molostart"):
            try:
                quickstart.main()
                raise AssertionError()
            except SystemExit:
                pass
Пример #8
0
    def test_generate(self):
        quickstart._input = self._input

        with set_args('molostart'):
            quickstart.main()

        result = os.listdir(self.location)
        result.sort()
        self.assertEqual(result, ['Makefile', 'loadtest.py', 'molotov.json'])

        # second runs stops
        with set_args('molostart'):
            try:
                quickstart.main()
                raise AssertionError()
            except SystemExit:
                pass