# Path: implementation/primaries/GUI/helpers.py
# def get_base_dir(return_this_dir=False):
# def parseStyle(stylesheet, theme, theme_folder):
# def cleanPath(path):
# def parseThemePath(path, theme_folder):
# def parseIconPath(path, theme):
# def postProcessLines(lines):
# def merge_instruments(instrument_list):
# def merge_clefs_and_keys(clef_or_key_dict):
# def fit_columns_to_widget(widget, columns):


import unittest
import sys
import os
from implementation.primaries.GUI import helpers
            expected = path
        self.assertEqual(expected, helpers.cleanPath(path))

    def testParseThemePath(self):
        path = 'themes/item.png'
        expected_path = os.path.join(self.theme_folder, 'item.png')
        if sys.platform != 'win32':
            expected = expected_path
        else:
            expected = "'" + expected_path + "'"
        cleaned_path = helpers.cleanPath(path)
        self.assertEqual(
            expected,
            helpers.parseThemePath(
                cleaned_path,
                self.theme_folder))

    def testParseThemePathWithCSS(self):
        line = 'background: url(/themes/zoom-out.png) center no-repeat;'
        expected_path = os.path.join(
            helpers.get_base_dir(True), 'themes', "zoom-out.png")
        if sys.platform == 'win32':
            expected = "background: url('" + \
                expected_path + '\') center no-repeat;'
        else:
            expected = "background: url(" + \
                expected_path + ') center no-repeat;'
        cleaned_path = helpers.cleanPath(line)
        self.assertEqual(
            expected,

# Path: implementation/primaries/GUI/helpers.py
# def get_base_dir(return_this_dir=False):
# def parseStyle(stylesheet, theme, theme_folder):
# def cleanPath(path):
# def parseThemePath(path, theme_folder):
# def parseIconPath(path, theme):
# def postProcessLines(lines):
# def merge_instruments(instrument_list):
# def merge_clefs_and_keys(clef_or_key_dict):
# def fit_columns_to_widget(widget, columns):


# Path: implementation/primaries/GUI/tests/testHelpers.py
import unittest
import sys
import os
from implementation.primaries.GUI import helpers

            expected = path
        self.assertEqual(expected, helpers.cleanPath(path))

    def testParseThemePath(self):
        path = 'themes/item.png'
        expected_path = os.path.join(self.theme_folder, 'item.png')
        if sys.platform != 'win32':
            expected = expected_path
        else:
            expected = "'" + expected_path + "'"
        cleaned_path = helpers.cleanPath(path)
        self.assertEqual(
            expected,
            helpers.parseThemePath(
                cleaned_path,
                self.theme_folder))

    def testParseThemePathWithCSS(self):
        line = 'background: url(/themes/zoom-out.png) center no-repeat;'
        expected_path = os.path.join(
            helpers.get_base_dir(True), 'themes', "zoom-out.png")
        if sys.platform == 'win32':
            expected = "background: url('" + \
                expected_path + '\') center no-repeat;'
        else:
            expected = "background: url(" + \
                expected_path + ') center no-repeat;'
        cleaned_path = helpers.cleanPath(line)
        self.assertEqual(
            expected,

            helpers.parseThemePath(