Skip to content

Commit 252aaa3

Browse files
committed
disable csv test with arabic on windows
1 parent b24db62 commit 252aaa3

File tree

1 file changed

+25
-22
lines changed

1 file changed

+25
-22
lines changed

dataframe-csv/src/test/kotlin/org/jetbrains/kotlinx/dataframe/io/DelimCsvTsvTests.kt

+25-22
Original file line numberDiff line numberDiff line change
@@ -518,29 +518,32 @@ class DelimCsvTsvTests {
518518

519519
dutchDf["price"].type() shouldBe typeOf<Double?>()
520520

521-
// while negative numbers in RTL languages cannot be parsed, thanks to Java, others work
522-
@Language("csv")
523-
val arabicCsv =
524-
"""
525-
الاسم; السعر;
526-
أ;١٢٫٤٥;
527-
ب;١٣٫٣٥;
528-
ج;١٠٠٫١٢٣;
529-
د;٢٠٤٫٢٣٥;
530-
هـ;ليس رقم;
531-
و;null;
532-
""".trimIndent()
533-
534-
val easternArabicDf = DataFrame.readCsvStr(
535-
arabicCsv,
536-
delimiter = ';',
537-
parserOptions = ParserOptions(
538-
locale = Locale.forLanguageTag("ar-001"),
539-
),
540-
)
521+
// skipping this test on windows due to lack of support for Arabic locales
522+
if (!System.getProperty("os.name").startsWith("Windows")) {
523+
// while negative numbers in RTL languages cannot be parsed thanks to Java, others work
524+
@Language("csv")
525+
val arabicCsv =
526+
"""
527+
الاسم; السعر;
528+
أ;١٢٫٤٥;
529+
ب;١٣٫٣٥;
530+
ج;١٠٠٫١٢٣;
531+
د;٢٠٤٫٢٣٥;
532+
هـ;ليس رقم;
533+
و;null;
534+
""".trimIndent()
535+
536+
val easternArabicDf = DataFrame.readCsvStr(
537+
arabicCsv,
538+
delimiter = ';',
539+
parserOptions = ParserOptions(
540+
locale = Locale.forLanguageTag("ar-001"),
541+
),
542+
)
541543

542-
easternArabicDf["السعر"].type() shouldBe typeOf<Double?>()
543-
easternArabicDf["الاسم"].type() shouldBe typeOf<String>() // apparently not a char
544+
easternArabicDf["السعر"].type() shouldBe typeOf<Double?>()
545+
easternArabicDf["الاسم"].type() shouldBe typeOf<String>() // apparently not a char
546+
}
544547
}
545548

546549
@Test

0 commit comments

Comments
 (0)