diff options
author | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-12-10 15:19:22 +0900 |
---|---|---|
committer | Tristan Van Berkom <tristan.vanberkom@codethink.co.uk> | 2016-12-10 15:19:22 +0900 |
commit | fcf68e3044101c16c2e21d96ecd15dcbeb1b03f6 (patch) | |
tree | f768e820672fc95fba6388c25bcd28a05e3ac5f6 /tests/loader | |
parent | 02c8a6b1e2e032b7dd43d62057af611b72eea6b4 (diff) | |
download | buildstream-fcf68e3044101c16c2e21d96ecd15dcbeb1b03f6.tar.gz |
pep8 fixes in loader arches test case
Diffstat (limited to 'tests/loader')
-rw-r--r-- | tests/loader/arches.py | 48 |
1 files changed, 35 insertions, 13 deletions
diff --git a/tests/loader/arches.py b/tests/loader/arches.py index 55415131e..99602d181 100644 --- a/tests/loader/arches.py +++ b/tests/loader/arches.py @@ -10,6 +10,7 @@ DATA_DIR = os.path.join( 'arches', ) + ############################################################## # Test Simple Arch Conditionals # ############################################################## @@ -17,7 +18,8 @@ DATA_DIR = os.path.join( def test_simple_conditional_nomatch(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/simple-conditional.bst', None, 'arm') + loader = Loader( + basedir, 'elements/simple-conditional.bst', None, 'arm') element = loader.load() assert(isinstance(element, MetaElement)) @@ -26,11 +28,13 @@ def test_simple_conditional_nomatch(datafiles): # Did not provide any arch specific data for 'arm', number remains 5 assert(number == 5) + @pytest.mark.datafiles(DATA_DIR) def test_simple_conditional_x86_64(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/simple-conditional.bst', None, 'x86_64') + loader = Loader( + basedir, 'elements/simple-conditional.bst', None, 'x86_64') element = loader.load() assert(isinstance(element, MetaElement)) @@ -39,11 +43,13 @@ def test_simple_conditional_x86_64(datafiles): # x86_64 arch overrides the number to 6 assert(number == 6) + @pytest.mark.datafiles(DATA_DIR) def test_simple_conditional_x86_32(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/simple-conditional.bst', None, 'x86_32') + loader = Loader( + basedir, 'elements/simple-conditional.bst', None, 'x86_32') element = loader.load() assert(isinstance(element, MetaElement)) @@ -52,6 +58,7 @@ def test_simple_conditional_x86_32(datafiles): # x86_32 arch overrides the number to 7 assert(number == 7) + ############################################################## # Test Arch Conditionals inside Variants # ############################################################## @@ -59,7 +66,8 @@ def test_simple_conditional_x86_32(datafiles): def test_variant_arch_default(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', None, 'arm') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', None, 'arm') element = loader.load() assert(isinstance(element, MetaElement)) @@ -68,11 +76,13 @@ def test_variant_arch_default(datafiles): # The default "pink" variant sets number to 6 assert(number == 6) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_default_x86_64(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', None, 'x86_64') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', None, 'x86_64') element = loader.load() assert(isinstance(element, MetaElement)) @@ -80,11 +90,13 @@ def test_variant_arch_default_x86_64(datafiles): assert(number == 7) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_default_x86_32(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', None, 'x86_32') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', None, 'x86_32') element = loader.load() assert(isinstance(element, MetaElement)) @@ -92,11 +104,13 @@ def test_variant_arch_default_x86_32(datafiles): assert(number == 8) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_pink_pony(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'pink', 'arm') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'pink', 'arm') element = loader.load() assert(isinstance(element, MetaElement)) @@ -105,11 +119,13 @@ def test_variant_arch_pink_pony(datafiles): # The default "pink" variant sets number to 6 assert(number == 6) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_pink_pony_x86_64(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'pink', 'x86_64') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'pink', 'x86_64') element = loader.load() assert(isinstance(element, MetaElement)) @@ -117,11 +133,13 @@ def test_variant_arch_pink_pony_x86_64(datafiles): assert(number == 7) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_pink_pony_x86_32(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'pink', 'x86_32') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'pink', 'x86_32') element = loader.load() assert(isinstance(element, MetaElement)) @@ -130,12 +148,12 @@ def test_variant_arch_pink_pony_x86_32(datafiles): assert(number == 8) - @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_blue_pony(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'blue', 'arm') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'blue', 'arm') element = loader.load() assert(isinstance(element, MetaElement)) @@ -144,11 +162,13 @@ def test_variant_arch_blue_pony(datafiles): # The "blue" variant sets number to 4 assert(number == 4) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_blue_pony_x86_64(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'blue', 'x86_64') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'blue', 'x86_64') element = loader.load() assert(isinstance(element, MetaElement)) @@ -156,11 +176,13 @@ def test_variant_arch_blue_pony_x86_64(datafiles): assert(number == 3) + @pytest.mark.datafiles(DATA_DIR) def test_variant_arch_blue_pony_x86_32(datafiles): basedir = os.path.join(datafiles.dirname, datafiles.basename) - loader = Loader(basedir, 'elements/variant-arch-conditional.bst', 'blue', 'x86_32') + loader = Loader( + basedir, 'elements/variant-arch-conditional.bst', 'blue', 'x86_32') element = loader.load() assert(isinstance(element, MetaElement)) |