132
132
"""Ensure the binary name is not given to argparse."""
133
133
main.main(["foo", "bar", sys.argv[0], "--minimized"])
134
134
self.assertEqual(self.start.args[1],
135
{'minimized': True, 'with_icon': False})
135
{'minimized': True, 'with_icon': False, 'installer': False})
137
137
def test_minimized_option(self):
138
138
"""Ensure the --minimized option is parsed and passed correctly."""
139
139
main.main([sys.argv[0], "--minimized"])
140
140
self.assertEqual(self.start.args[1],
141
{'minimized': True, 'with_icon': False})
141
{'minimized': True, 'with_icon': False, 'installer': False})
143
143
def test_with_icon_option(self):
144
144
"""Ensure the --minimized option is parsed and passed correctly."""
145
145
main.main([sys.argv[0], "--with-icon"])
146
146
self.assertEqual(self.start.args[1],
147
{'minimized': False, 'with_icon': True})
147
{'minimized': False, 'with_icon': True, 'installer': False})
149
149
def test_all_styles_load(self):
150
150
"""Ensure the platform style is loaded."""
160
160
main.main([sys.argv[0], "--switch-to", "folders"])
161
161
self.assertEqual(self.start.window.tabname, "folders")
163
def test_installer_option(self):
164
"""Ensure the --installer option is parsed and passed correctly."""
165
main.main([sys.argv[0], "--installer"])
166
self.assertEqual(self.start.args[1],
167
{'minimized': False, 'with_icon': False, 'installer': True})
163
169
def test_translator(self):
164
170
"""Ensure the Qt translator is loaded."""
165
171
main.main([sys.argv[0]])