mirror of
https://github.com/TheAnachronism/docspell.git
synced 2025-06-22 02:18:26 +00:00
Convert unit tests to munit
This commit is contained in:
@ -3,15 +3,14 @@ package docspell.extract.ocr
|
||||
import cats.effect.IO
|
||||
import docspell.common.Logger
|
||||
import docspell.files.TestFiles
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object TextExtractionSuite extends SimpleTestSuite {
|
||||
class TextExtractionSuite extends FunSuite {
|
||||
import TestFiles._
|
||||
|
||||
val logger = Logger.log4s[IO](org.log4s.getLogger)
|
||||
|
||||
test("extract english pdf") {
|
||||
ignore()
|
||||
test("extract english pdf".ignore) {
|
||||
val text = TextExtract
|
||||
.extract[IO](letterSourceEN, blocker, logger, "eng", OcrConfig.default)
|
||||
.compile
|
||||
@ -20,8 +19,7 @@ object TextExtractionSuite extends SimpleTestSuite {
|
||||
println(text)
|
||||
}
|
||||
|
||||
test("extract german pdf") {
|
||||
ignore()
|
||||
test("extract german pdf".ignore) {
|
||||
val expect = TestFiles.letterDEText
|
||||
val extract = TextExtract
|
||||
.extract[IO](letterSourceDE, blocker, logger, "deu", OcrConfig.default)
|
||||
|
@ -2,9 +2,9 @@ package docspell.extract.odf
|
||||
|
||||
import cats.effect._
|
||||
import docspell.files.{ExampleFiles, TestFiles}
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object OdfExtractTest extends SimpleTestSuite {
|
||||
class OdfExtractTest extends FunSuite {
|
||||
val blocker = TestFiles.blocker
|
||||
implicit val CS = TestFiles.CS
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
package docspell.extract.pdfbox
|
||||
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object PdfMetaDataTest extends SimpleTestSuite {
|
||||
class PdfMetaDataTest extends FunSuite {
|
||||
|
||||
test("split keywords on comma") {
|
||||
val md = PdfMetaData.empty.copy(keywords = Some("a,b, c"))
|
||||
|
@ -2,9 +2,9 @@ package docspell.extract.pdfbox
|
||||
|
||||
import cats.effect._
|
||||
import docspell.files.{ExampleFiles, TestFiles}
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object PdfboxExtractTest extends SimpleTestSuite {
|
||||
class PdfboxExtractTest extends FunSuite {
|
||||
val blocker = TestFiles.blocker
|
||||
implicit val CS = TestFiles.CS
|
||||
|
||||
|
@ -2,11 +2,11 @@ package docspell.extract.pdfbox
|
||||
|
||||
import cats.effect._
|
||||
import docspell.files.{ExampleFiles, TestFiles}
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
import java.nio.file.Path
|
||||
import fs2.Stream
|
||||
|
||||
object PdfboxPreviewTest extends SimpleTestSuite {
|
||||
class PdfboxPreviewTest extends FunSuite {
|
||||
val blocker = TestFiles.blocker
|
||||
implicit val CS = TestFiles.CS
|
||||
|
||||
|
@ -3,9 +3,9 @@ package docspell.extract.poi
|
||||
import cats.effect._
|
||||
import docspell.common.MimeTypeHint
|
||||
import docspell.files.{ExampleFiles, TestFiles}
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object PoiExtractTest extends SimpleTestSuite {
|
||||
class PoiExtractTest extends FunSuite {
|
||||
val blocker = TestFiles.blocker
|
||||
implicit val CS = TestFiles.CS
|
||||
|
||||
|
@ -1,9 +1,9 @@
|
||||
package docspell.extract.rtf
|
||||
|
||||
import docspell.files.ExampleFiles
|
||||
import minitest.SimpleTestSuite
|
||||
import munit._
|
||||
|
||||
object RtfExtractTest extends SimpleTestSuite {
|
||||
class RtfExtractTest extends FunSuite {
|
||||
|
||||
test("extract text from rtf using java input-stream") {
|
||||
val file = ExampleFiles.examples_sample_rtf
|
||||
|
Reference in New Issue
Block a user