Skip to content

Commit

Permalink
Add async test for classifier
Browse files Browse the repository at this point in the history
  • Loading branch information
lukereichold committed Jul 25, 2020
1 parent 3b48f08 commit 1f569dd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Tests/VisualActionKitTests/VisualActionKitTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,16 @@ final class VisualActionKitTests: XCTestCase {
let url = Bundle.module.url(forResource: "writing", withExtension: "mp4")!
let asset = AVAsset(url: url)

let expectation = self.expectation(description: "Writing Clip")
var actualPredictions: Classifier.Predictions?

try! Classifier.shared.classify(asset) { predictions in
debugPrint(predictions)
actualPredictions = predictions
expectation.fulfill()
}

waitForExpectations(timeout: 60, handler: nil)
XCTAssertEqual(actualPredictions?.first?.classLabel, "writing")
}

func testNormalizedColor() {
Expand Down

0 comments on commit 1f569dd

Please sign in to comment.