You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

23 lines
505 B

from gooey.python_bindings import modules
__author__ = 'Chris'
import unittest
class TestModules(unittest.TestCase):
def test_load_creates_and_imports_module_from_string_source(self):
module_source = '''
some_var = 1234
def fooey():
return 10
'''
module = modules.load(module_source)
self.assertEqual(10, module.fooey())
def test_generate_pyfilename_does_not_begin_with_digit(self):
self.assertTrue(not modules.generate_pyfilename()[0].isdigit())