Skip to content

Commit

Permalink
Removing CoreMLPlugin tests
Browse files Browse the repository at this point in the history
  • Loading branch information
ruisebas committed Apr 30, 2024
1 parent a6c2f08 commit 856768f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 18 deletions.
6 changes: 3 additions & 3 deletions .github/composite_actions/get_platform_parameters/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,9 +63,9 @@ runs:
DESTINATION_MAPPING='{
"minimum": {
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=17.0",
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=16.4",
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=9.4",
"iOS": "platform=iOS Simulator,name=iPhone 14,OS=17.0.1",
"tvOS": "platform=tvOS Simulator,name=Apple TV 4K (3rd generation),OS=17.0",
"watchOS": "platform=watchOS Simulator,name=Apple Watch Series 8 (45mm),OS=10.0",
"macOS": "platform=macOS,arch=x86_64"
},
"latest": {
Expand Down
6 changes: 2 additions & 4 deletions .github/workflows/unit_test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ jobs:
AWSPredictionsPlugin,
AWSPinpointAnalyticsPlugin,
AWSPinpointPushNotificationsPlugin,
AWSS3StoragePlugin,
CoreMLPredictionsPlugin
AWSS3StoragePlugin
]
uses: ./.github/workflows/run_unit_tests_platforms.yml
with:
Expand All @@ -96,8 +95,7 @@ jobs:
{ scheme: AWSPredictionsPlugin, flags: 'Predictions_plugin_unit_test,unit_tests' },
{ scheme: AWSPinpointAnalyticsPlugin, flags: 'Analytics_plugin_unit_test,unit_tests' },
{ scheme: AWSPinpointPushNotificationsPlugin, flags: 'PushNotifications_plugin_unit_test,unit_tests' },
{ scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' },
{ scheme: CoreMLPredictionsPlugin, flags: 'CoreMLPredictions_plugin_unit_test,unit_tests' }
{ scheme: AWSS3StoragePlugin, flags: 'Storage_plugin_unit_test,unit_tests' }
]
uses: ./.github/workflows/upload_coverage_report.yml
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ class CoreMLNaturalLanguageAdapterTests: XCTestCase {
/// - Then:
/// - I should get back correct tokens
///
#if !os(watchOS) && !os(iOS)
func testSyntaxToken() {
let text = "The ripe taste of cheese improves with age."
let result = coreMLNaturalLanguageAdapter.getSyntaxTokens(for: text)
Expand All @@ -65,7 +64,7 @@ class CoreMLNaturalLanguageAdapterTests: XCTestCase {
"First word in the input should be determiner"
)
}
#endif

/// Test syntax token with invalid text
///
/// - Given: CoreML Adapter
Expand All @@ -89,7 +88,7 @@ class CoreMLNaturalLanguageAdapterTests: XCTestCase {
/// - Then:
/// - I should get back valid result
///
#if !os(watchOS) && !os(iOS)
#if !os(watchOS)
func testEntityToken() {
let text = "The American Red Cross was established in Washington, D.C., by Clara Barton."
let result = coreMLNaturalLanguageAdapter.getEntities(for: text)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,20 +17,19 @@ class CoreMLVisionAdapterTests: XCTestCase {
coreMLVisionAdapter = CoreMLVisionAdapter()
}

func testDetectText() throws {
func testDetectLabels() throws {
let url = try XCTUnwrap(
Bundle.module.url(forResource: "screenshotWithText", withExtension: "png", subdirectory: "TestImages")
Bundle.module.url(forResource: "people", withExtension: "jpg", subdirectory: "TestImages")
)
let result = try coreMLVisionAdapter.detectText(url)
let result = try coreMLVisionAdapter.detectLabels(url)
XCTAssertNotNil(result, "The result should be nil")
}

#if !os(macOS)
func testDetectLabels() throws {
func testDetectText() throws {
let url = try XCTUnwrap(
Bundle.module.url(forResource: "people", withExtension: "jpg", subdirectory: "TestImages")
Bundle.module.url(forResource: "screenshotWithText", withExtension: "png", subdirectory: "TestImages")
)
let result = try coreMLVisionAdapter.detectLabels(url)
let result = try coreMLVisionAdapter.detectText(url)
XCTAssertNotNil(result, "The result should be nil")
}

Expand All @@ -42,6 +41,5 @@ class CoreMLVisionAdapterTests: XCTestCase {
XCTAssertNotNil(result, "The result should be nil")
XCTAssertTrue(result?.entities.isEmpty != true, "The result should contain values for the image provided.")
}
#endif
}
#endif

0 comments on commit 856768f

Please sign in to comment.