def test_jqpc_write__resource_dict__expect_failure1():
   """ Tests: test_jqpc_write__resource_dict__expect_failure1
   """
   print('::: TEST: test_jqpc_write__resource_dict__expect_failure1()')

   out_dir_path = path_join(SCRIPT_PATH, 'out_dir_test_jqpc_write__resource_dict__expect_failure1')
   if path_exists(out_dir_path):
      shutil_rmtree(out_dir_path)

   jqpc_write__resource_dict('wrong_name', out_dir_path, force=True)
   if path_exists(out_dir_path):
      shutil_rmtree(out_dir_path)
def test_jqpc_write__resource_dict__expect_failure2():
    """ Tests: test_jqpc_write__resource_dict__expect_failure2
   """
    print('::: TEST: test_jqpc_write__resource_dict__expect_failure2()')

    out_dir_path = path_join(
        SCRIPT_PATH, 'out_dir_test_jqpc_write__resource_dict__expect_failure2')
    if path_exists(out_dir_path):
        shutil_rmtree(out_dir_path)

    jqpc_write__resource_dict('wrong' '-name', out_dir_path, force=False)
    if path_exists(out_dir_path):
        shutil_rmtree(out_dir_path)
Пример #3
0
def test_jqpc_get_html_js_css_resources__expect_failure1():
   """ Tests: test_jqpc_get_html_js_css_resources__expect_failure1
   """
   print('::: TEST: test_jqpc_get_html_js_css_resources__expect_failure1()')

   source_scripts_path = path_join(SCRIPT_PATH, 'source_scripts')
   # make sure we have the needed resources
   jqpc_write__resource_dict('jqplot_scripts', source_scripts_path, force=False)

   needed_resources = [
      'jquery.min.js',
      'jquery.jqplot.min.css',
      'wrong_resource_name',
   ]
   out_js_css_resources = jqpc_get_html_js_css_resources(
      needed_resources,
      source_scripts_path,
      path_relpath(source_scripts_path),
      indent='      '
   )
Пример #4
0
def test_jqpc_get_html_js_css_resources_ok2():
   """ Tests: test_jqpc_get_html_js_css_resources_ok2
   """
   print('::: TEST: test_jqpc_get_html_js_css_resources_ok2()')

   source_scripts_path = path_join(SCRIPT_PATH, 'source_scripts')
   # make sure we have the needed resources
   jqpc_write__resource_dict('jqplot_scripts', source_scripts_path, force=False)

   needed_resources = [
      'jquery.min.js',
      'jquery.jqplot.min.css',
      'jqplot.highlighter.min.js',
   ]
   out_js_css_resources = jqpc_get_html_js_css_resources(
      needed_resources,
      source_scripts_path,
      path_abspath(source_scripts_path),
      indent='      '
   )
Пример #5
0
def test_jqpc_get_html_js_css_resources__expect_failure1():
    """ Tests: test_jqpc_get_html_js_css_resources__expect_failure1
   """
    print('::: TEST: test_jqpc_get_html_js_css_resources__expect_failure1()')

    source_scripts_path = path_join(SCRIPT_PATH, 'source_scripts')
    # make sure we have the needed resources
    jqpc_write__resource_dict('jqplot_scripts',
                              source_scripts_path,
                              force=False)

    needed_resources = [
        'jquery.min.js',
        'jquery.jqplot.min.css',
        'wrong_resource_name',
    ]
    out_js_css_resources = jqpc_get_html_js_css_resources(
        needed_resources,
        source_scripts_path,
        path_relpath(source_scripts_path),
        indent='      ')
Пример #6
0
def test_jqpc_get_html_js_css_resources_ok2():
    """ Tests: test_jqpc_get_html_js_css_resources_ok2
   """
    print('::: TEST: test_jqpc_get_html_js_css_resources_ok2()')

    source_scripts_path = path_join(SCRIPT_PATH, 'source_scripts')
    # make sure we have the needed resources
    jqpc_write__resource_dict('jqplot_scripts',
                              source_scripts_path,
                              force=False)

    needed_resources = [
        'jquery.min.js',
        'jquery.jqplot.min.css',
        'jqplot.highlighter.min.js',
    ]
    out_js_css_resources = jqpc_get_html_js_css_resources(
        needed_resources,
        source_scripts_path,
        path_abspath(source_scripts_path),
        indent='      ')
def test_jqpc_write__resource_dict_ok1():
   """ Tests: test_jqpc_write__resource_dict_ok1
   """
   print('::: TEST: test_jqpc_write__resource_dict_ok1()')

   out_dir_path = path_join(SCRIPT_PATH, 'out_dir_path_test_jqpc_write__resource_dict_ok1')
   if path_exists(out_dir_path):
      shutil_rmtree(out_dir_path)

   jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=False)
   jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=True)
   jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=False)

   if path_exists(out_dir_path):
      shutil_rmtree(out_dir_path)
def test_jqpc_write__resource_dict_ok1():
    """ Tests: test_jqpc_write__resource_dict_ok1
   """
    print('::: TEST: test_jqpc_write__resource_dict_ok1()')

    out_dir_path = path_join(
        SCRIPT_PATH, 'out_dir_path_test_jqpc_write__resource_dict_ok1')
    if path_exists(out_dir_path):
        shutil_rmtree(out_dir_path)

    jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=False)
    jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=True)
    jqpc_write__resource_dict('jqplot_scripts', out_dir_path, force=False)

    if path_exists(out_dir_path):
        shutil_rmtree(out_dir_path)