self.ignore_comment = ignore_comment
self.case_insensitive = case_insensitive
+ if self.ignore_comment:
+ self.ignore_empty = True
+
if comment_chars:
if isinstance(comment_chars, (list, set, tuple)):
for char in comment_chars:
--- /dev/null
+[core]
+; some core components
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+s0_wm_cmd = marco --replace
+
+[grid]
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+# Colors on resizing
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; Animation effects
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+s0_prev-all-key = <Shift><Alt>Tab
+s0_next-all-key = <Alt>Tab
+
+[td]
+
+
--- /dev/null
+[core]
+; some core components
+
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+
+s0_wm_cmd = marco --replace
+
+[grid]
+
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+# Colors on resizing
+
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; Animation effects
+
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+
+s0_prev-all-key = <Shift><Alt>Tab
+s0_next-all-key = <Alt>Tab
+
+[td]
+
--- /dev/null
+[core]
+; some core components
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+s0_wm_cmd = marco --replace
+
+[grid]
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+# Colors on resizing
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; Animation effects
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+s0_prev-all-key = <Shift><Alt>Tab
+s0_next-all-key = <Alt>Tab
+
+[td]
+
+
--- /dev/null
+[core]
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+# crashhandler stuff
+s0_wm_cmd = marco --replace
+
+[grid]
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+; Colors on resizing
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; Animation effects
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+s0_prev-all-key = <Shift><Alt>Tab
+s0_next-all-key = <Alt>Tab
+
+[td]
+
+# vim: et filetype=dosini
--- /dev/null
+[core]
+; some core components
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+s0_wm_cmd = marco --replace
+
+[grid]
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+# colors on resizing
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; animation effects
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+s0_prev-all-key = <shift><alt>tab
+s0_next-all-key = <ALT>TAB
+
+[td]
+
+
--- /dev/null
+[core]
+; some core components
+s0_active_plugins = core;composite;opengl;compiztoolbox;copytex;decor;imgpng;cube;gnomecompat;regex;rotate;move;resize;grid;commands;staticswitcher;animation;expo;wobbly;
+s0_hsize = 4
+s0_focus_prevention_level = 1
+s0_focus_prevention_match = !(class=Polkit-gnome-authentication-agent-1) & !(class=MintMenu.py)
+
+[gnomecompat]
+# Gnome compatibility
+s0_command_screenshot = mate-screenshot
+s0_command_window_screenshot = mate-screenshot --window
+s0_command_terminal = mate-terminal
+
+[crashhandler]
+s0_wm_cmd = marco --replace
+
+[grid]
+s0_top_left_corner_action = 7
+s0_top_right_corner_action = 9
+s0_bottom_left_corner_action = 1
+s0_bottom_right_corner_action = 3
+s0_bottom_edge_action = 2
+s0_top_edge_action = 8
+s0_outline_color = #84fb009f
+s0_fill_color = #74fb004f
+
+[resize]
+# Colors on resizing
+s0_border_color = #7dfb009f
+s0_fill_color = #8afb0019
+
+[expo]
+s0_selected_color = #000000ff
+s0_reflection = true
+s0_expo_key = <Control><Alt>Up
+
+[wall]
+s0_up_key = Disabled
+s0_down_key = Disabled
+
+[animation]
+; Animation effects
+s0_unminimize_effects =
+s0_unminimize_durations =
+s0_unminimize_matches =
+s0_unminimize_options =
+s0_unminimize_random_effects =
+
+[cube]
+s0_top_color = #3c3c3cff
+s0_bottom_color = #3c3c3cff
+s0_skydome = true
+s0_skydome_gradient_start_color = #000000ff
+s0_skydome_gradient_end_color = #727272ff
+
+[staticswitcher]
+s0_prev-all-key = <Shift><Alt>Tab
+s0_next-all-key = <Alt>Tab
+
+[td]
+
+
super(AdminToolsTestcase, self).__init__(methodName)
+ self.test_dir = os.path.abspath(os.path.dirname(__file__))
+
# -------------------------------------------------------------------------
@property
def verbose(self):
import sys
import logging
import locale
+import re
try:
import unittest2 as unittest
except ImportError:
import unittest
+import six
+
from pb_base.common import pp
from pb_base.common import bytes2human
def setUp(self):
self.appname = APPNAME
+ self.files_dir = os.path.join(self.test_dir, 'files')
+
+ self.cfg_base = os.path.join(self.files_dir, 'base.ini')
+ self.cfg_clone = os.path.join(self.files_dir, 'clone.ini')
+ self.cfg_blanklines = os.path.join(self.files_dir, 'blanklines.ini')
+ self.cfg_withespace = os.path.join(self.files_dir, 'withespace.ini')
+ self.cfg_comments = os.path.join(self.files_dir, 'comments.ini')
+ self.cfg_ignorecase = os.path.join(self.files_dir, 'ignorecase.ini')
+
+ self.re_eol = re.compile('(?:\r|\r?\n)$')
+
# -------------------------------------------------------------------------
def tearDown(self):
pass
+ # -------------------------------------------------------------------------
+ def read_file(self, filename, strip_eol=False)):
+
+ lines = []
+
+ open_args = {}
+ if six.PY3:
+ open_args = {
+ 'encoding': 'utf-8',
+ 'errors': 'surrogateescape',
+ }
+
+ with open(filename, 'r', **open_args) as fh:
+ for line in fh.readlines():
+ if strip_eol:
+ lines.append(self.re_eol.sub(line))
+ else:
+ lines.append(line)
# -------------------------------------------------------------------------
def test_import(self):
self.assertEqual(result, expected)
+ # -------------------------------------------------------------------------
+ def test_compare_equal(self):
+
+ LOG.info("Testing execution of compare on equal string lists ...")
+
+ list_a =
+
# =============================================================================