Skip to content

Commit 841ab8c

Browse files
committed
updated tests to include tvOS tests
1 parent 4b32d23 commit 841ab8c

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

source/ExportUnityPackage/export_unity_package.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@
7272
# platforms including the editor.
7373
# * Android
7474
# * iOS
75+
# * tvOS
7576
"platforms": ["Editor", "Standalone", "Android", "iOS"],
7677
7778
# CPUs supported by standalone or editor platforms when the

source/ExportUnityPackage/export_unity_package_test.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,6 +1678,7 @@ def test_apply_any_platform_selection_serializationv1(self):
16781678
del platform_data["Win64"]
16791679
del platform_data["WindowsStoreApps"]
16801680
del platform_data["iOS"]
1681+
del platform_data["tvOS"]
16811682

16821683
expected_metadata = copy.deepcopy(
16831684
export_unity_package.PLUGIN_IMPORTER_METADATA_TEMPLATE)
@@ -1697,6 +1698,7 @@ def test_apply_any_platform_selection_serializationv1(self):
16971698
platform_data["Win64"]["enabled"] = 1
16981699
platform_data["WindowsStoreApps"]["enabled"] = 1
16991700
platform_data["iOS"]["enabled"] = 1
1701+
platform_data["tvOS"]["enabled"] = 1
17001702

17011703
all_platforms_enabled = (
17021704
export_unity_package.Asset.apply_any_platform_selection(
@@ -2051,6 +2053,15 @@ def test_importer_metadata_ios_only(self):
20512053
self.package, {"importer": "PluginImporter",
20522054
"platforms": ["iOS"]}).importer_metadata)
20532055

2056+
def test_importer_metadata_tvos_only(self):
2057+
"""Create metadata that only targets tvOS."""
2058+
self.plugin_metadata["PluginImporter"]["platformData"]["tvOS"]["enabled"] = 1
2059+
self.assertEqual(
2060+
self.plugin_metadata,
2061+
export_unity_package.AssetConfiguration(
2062+
self.package, {"importer": "PluginImporter",
2063+
"platforms": ["tvOS"]}).importer_metadata)
2064+
20542065
def test_importer_metadata_standalone_invalid_cpu(self):
20552066
"""Create metadata with an invalid CPU."""
20562067
with self.assertRaises(export_unity_package.ProjectConfigurationError):

0 commit comments

Comments
 (0)