Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2138)

Unified Diff: Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py

Issue 546133003: Reformat webkitpy.layout_tests w/ format-webkitpy. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
diff --git a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
index d56d7b5655aa349392300f88862ee767223dc29e..71b0e62870baabe9797b3e1e2a0ff5e8319a8d84 100644
--- a/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
+++ b/Tools/Scripts/webkitpy/layout_tests/models/test_configuration_unittest.py
@@ -46,6 +46,7 @@ MOCK_MACROS = {
class TestConfigurationTest(unittest.TestCase):
+
def test_items(self):
config = TestConfiguration('xp', 'x86', 'release')
result_config_dict = {}
@@ -80,7 +81,11 @@ class TestConfigurationTest(unittest.TestCase):
self.assertRaises(KeyError, query_unknown_key)
self.assertIn(TestConfiguration('xp', 'x86', 'release'), config_dict)
self.assertNotIn(TestConfiguration('xp', 'x86', 'debug'), config_dict)
- configs_list = [TestConfiguration('xp', 'x86', 'release'), TestConfiguration('xp', 'x86', 'debug'), TestConfiguration('xp', 'x86', 'debug')]
+ configs_list = [
+ TestConfiguration(
+ 'xp', 'x86', 'release'), TestConfiguration(
+ 'xp', 'x86', 'debug'), TestConfiguration(
+ 'xp', 'x86', 'debug')]
self.assertEqual(len(configs_list), 3)
self.assertEqual(len(set(configs_list)), 2)
@@ -97,6 +102,7 @@ class TestConfigurationTest(unittest.TestCase):
class SpecifierSorterTest(unittest.TestCase):
+
def __init__(self, testFunc):
self._all_test_configurations = make_mock_all_test_configurations_set()
unittest.TestCase.__init__(self, testFunc)
@@ -143,18 +149,21 @@ class SpecifierSorterTest(unittest.TestCase):
self.assertEqual(sorter.sort_specifiers(set(['x86'])), ['x86'])
self.assertEqual(sorter.sort_specifiers(set(['x86', 'win7'])), ['win7', 'x86'])
self.assertEqual(sorter.sort_specifiers(set(['x86', 'debug', 'win7'])), ['win7', 'x86', 'debug'])
- self.assertEqual(sorter.sort_specifiers(set(['snowleopard', 'x86', 'debug', 'win7'])), ['snowleopard', 'win7', 'x86', 'debug'])
+ self.assertEqual(sorter.sort_specifiers(set(['snowleopard', 'x86', 'debug', 'win7'])), [
+ 'snowleopard', 'win7', 'x86', 'debug'])
self.assertEqual(sorter.sort_specifiers(set(['x86', 'mac', 'debug', 'win7'])), ['mac', 'win7', 'x86', 'debug'])
class TestConfigurationConverterTest(unittest.TestCase):
+
def __init__(self, testFunc):
self._all_test_configurations = make_mock_all_test_configurations_set()
unittest.TestCase.__init__(self, testFunc)
def test_symmetric_difference(self):
self.assertEqual(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c'])]), set(['a', 'c']))
- self.assertEqual(TestConfigurationConverter.symmetric_difference([set(['a', 'b']), set(['b', 'c']), set(['b', 'd'])]), set(['a', 'c', 'd']))
+ self.assertEqual(TestConfigurationConverter.symmetric_difference(
+ [set(['a', 'b']), set(['b', 'c']), set(['b', 'd'])]), set(['a', 'c', 'd']))
def test_to_config_set(self):
converter = TestConfigurationConverter(self._all_test_configurations)
@@ -183,12 +192,12 @@ class TestConfigurationConverterTest(unittest.TestCase):
TestConfiguration('xp', 'x86', 'release'),
TestConfiguration('lucid', 'x86', 'release'),
TestConfiguration('lucid', 'x86_64', 'release'),
- ])
+ ])
self.assertEqual(converter.to_config_set(set(['release'])), configs_to_match)
configs_to_match = set([
- TestConfiguration('lucid', 'x86_64', 'release'),
- TestConfiguration('lucid', 'x86_64', 'debug'),
+ TestConfiguration('lucid', 'x86_64', 'release'),
+ TestConfiguration('lucid', 'x86_64', 'debug'),
])
self.assertEqual(converter.to_config_set(set(['x86_64'])), configs_to_match)
@@ -265,7 +274,8 @@ class TestConfigurationConverterTest(unittest.TestCase):
TestConfiguration('lucid', 'x86_64', 'debug'),
TestConfiguration('xp', 'x86', 'release'),
])
- self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['release', 'xp']), set(['debug', 'x86_64', 'linux'])])
+ self.assertEqual(converter.to_specifiers_list(
+ configs_to_match), [set(['release', 'xp']), set(['debug', 'x86_64', 'linux'])])
configs_to_match = set([
TestConfiguration('xp', 'x86', 'release'),
@@ -300,7 +310,8 @@ class TestConfigurationConverterTest(unittest.TestCase):
TestConfiguration('win7', 'x86', 'debug'),
TestConfiguration('lucid', 'x86', 'release'),
])
- self.assertEqual(converter.to_specifiers_list(configs_to_match), [set(['win7']), set(['release', 'linux', 'x86']), set(['release', 'xp', 'mac'])])
+ self.assertEqual(converter.to_specifiers_list(configs_to_match), [
+ set(['win7']), set(['release', 'linux', 'x86']), set(['release', 'xp', 'mac'])])
def test_macro_collapsing(self):
macros = {'foo': ['bar', 'baz'], 'people': ['bob', 'alice', 'john']}

Powered by Google App Engine
This is Rietveld 408576698