Beispiel #1
0
 def test_execute_command(self):
     """Test execution of a helpy command"""
     state = StateObject()
     if (state.py_major == 2 and state.py_minor > 6) or state.py3:
         response = muterun('helpy sys')
         self.assertEqual(response.exitcode, 0)
         self.assertTrue(len(response.stdout) > 0)
         self.assertEqual(response.stderr, b'')
     elif state.py_major == 2 and state.py_minor == 6:
         res = subprocess.check_call(['helpy', 'sys'])
         self.assertEqual(res, 0)
#!/usr/bin/env python
# coding=utf-8

import unittest
import os
from Naked.toolshed.file import FileReader
from Naked.toolshed.file import FileWriter
from Naked.toolshed.system import make_path
from Naked.toolshed.ink import Template, Renderer
from Naked.toolshed.state import StateObject
state = StateObject()


class NakedInkTemplateTest(unittest.TestCase):
    def setUp(self):
        self.template_path = make_path("testfiles", "keep", "inktests",
                                       "test_setup_template.py")
        self.template_path2 = make_path("testfiles", "keep", "inktests",
                                        "test_setup_template2.py")
        self.standard_path = make_path("testfiles", "keep", "inktests",
                                       "test_setup_standard.py")
        self.key_dictionary = {
            'appname': 'test',
            'description': 'A cool app',
            'url': 'http://test.com',
            'license': 'MIT',
            'author': 'Christopher Simpkins',
            'email': '*****@*****.**'
        }

    def tearDown(self):
Beispiel #3
0
 def setUp(self):
     self.state = StateObject()
     self.cur_dir = os.getcwd()