Ejemplo n.º 1
0
def run(build_spec):
  app = wx.App(False)

  i18n.load(build_spec['language_dir'], build_spec['language'])
  image_repository.patch_images(build_spec['image_dir'])
  frame = BaseWindow(build_spec)
  frame.Show(True)
  app.MainLoop()
Ejemplo n.º 2
0
def run(build_spec):
    app = wx.App(False)

    i18n.load(build_spec['language_dir'], build_spec['language'])
    image_repository.patch_images(build_spec['image_dir'])
    controller = Controller(build_spec)
    controller.run()
    app.MainLoop()
Ejemplo n.º 3
0
def run(build_spec):
  app = wx.App(False)

  i18n.load(build_spec['language_dir'], build_spec['language'])
  image_repository.patch_images(build_spec['image_dir'])
  controller = Controller(build_spec)
  controller.run()
  app.MainLoop()
Ejemplo n.º 4
0
def run(build_spec):
    app = wx.App(False)

    i18n.load(build_spec['language_dir'], build_spec['language'])
    image_repository.patch_images(build_spec['image_dir'])
    frame = BaseWindow(build_spec)
    frame.Show(True)
    app.MainLoop()
Ejemplo n.º 5
0
def test_patch_returns_error_on_invalid_dir():
  '''
  patch should explode with a helpful message if it
  cannot find the supplied directory
  '''
  from gooey.gui import image_repository

  with pytest.raises(IOError) as kaboom:
    image_repository.patch_images('foo/bar/not/a/path')

  # our error
  assert ' user supplied' in str(kaboom.value)
  assert 'foo/bar/not/a/path' in str(kaboom.value)
Ejemplo n.º 6
0
def test_patch_returns_error_on_invalid_dir():
  '''
  patch should explode with a helpful message if it
  cannot find the supplied directory
  '''
  from gooey.gui import image_repository

  with pytest.raises(IOError) as kaboom:
    image_repository.patch_images('foo/bar/not/a/path')

  # our error
  assert ' user supplied' in str(kaboom.value)
  assert 'foo/bar/not/a/path' in str(kaboom.value)
Ejemplo n.º 7
0
def test_module_scope_is_updated_on_patch(expected_attrs):
  '''
  Patch should update the module's globals() on success
  '''
  from gooey.gui import image_repository
  testing_icons = ('config_icon.png', 'success_icon.png')
  try:
    # setup
    make_user_files(*testing_icons)
    old_icon = image_repository.config_icon
    # load up our new icon(s)
    image_repository.patch_images(tempfile.tempdir)
    new_icon = image_repository.config_icon
    assert old_icon != new_icon
  finally:
    cleanup_temp(*testing_icons)
Ejemplo n.º 8
0
def test_module_scope_is_updated_on_patch(expected_attrs):
  '''
  Patch should update the module's globals() on success
  '''
  from gooey.gui import image_repository
  testing_icons = ('config_icon.png', 'success_icon.png')
  try:
    # setup
    make_user_files(*testing_icons)
    old_icon = image_repository.config_icon
    # load up our new icon(s)
    image_repository.patch_images(tempfile.tempdir)
    new_icon = image_repository.config_icon
    assert old_icon != new_icon
  finally:
    cleanup_temp(*testing_icons)