Skip to content

Commit a6d7381

Browse files
committed
use more very long strings in the tests
1 parent 83e43f4 commit a6d7381

File tree

2 files changed

+12
-7
lines changed

2 files changed

+12
-7
lines changed

stringdtype/tests/test_char.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,12 @@
44

55
from stringdtype import StringDType
66

7-
TEST_DATA = ["hello", "Ae¢☃€ 😊", "entry\nwith\nnewlines", "entry\twith\ttabs"]
7+
TEST_DATA = [
8+
"hello" * 10,
9+
"Ae¢☃€ 😊" * 100,
10+
"entry\nwith\nnewlines",
11+
"entry\twith\ttabs",
12+
]
813

914

1015
@pytest.fixture
@@ -94,11 +99,11 @@ def test_binary(string_array, unicode_array, function_name, args):
9499

95100

96101
def test_strip(string_array, unicode_array):
97-
rjs = np.char.rjust(string_array, 25)
98-
rju = np.char.rjust(unicode_array, 25)
102+
rjs = np.char.rjust(string_array, 1000)
103+
rju = np.char.rjust(unicode_array, 1000)
99104

100-
ljs = np.char.ljust(string_array, 25)
101-
lju = np.char.ljust(unicode_array, 25)
105+
ljs = np.char.ljust(string_array, 1000)
106+
lju = np.char.ljust(unicode_array, 1000)
102107

103108
assert_array_equal(
104109
np.char.lstrip(rjs),

stringdtype/tests/test_stringdtype.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717

1818
@pytest.fixture
1919
def string_list():
20-
return ["abc", "def", "ghi" * 10, "A¢☃€ 😊", "Abc", "DEF"]
20+
return ["abc", "def", "ghi" * 10, "A¢☃€ 😊" * 100, "Abc" * 1000, "DEF"]
2121

2222

2323
pd_param = pytest.param(
@@ -121,7 +121,7 @@ def test_array_creation_utf8(dtype, data):
121121
def test_array_creation_scalars(string_list):
122122
arr = np.array([StringScalar(s) for s in string_list])
123123
assert (
124-
str(arr)
124+
str(arr).replace("\n", "")
125125
== "[" + " ".join(["'" + str(s) + "'" for s in string_list]) + "]"
126126
)
127127
assert arr.dtype == StringDType()

0 commit comments

Comments
 (0)