Skip to content

Commit 3ad6cd9

Browse files
committed
StringColumnProfile: shorten __str__ result assertion.
1 parent c961d0b commit 3ad6cd9

1 file changed

Lines changed: 1 addition & 37 deletions

File tree

tests/test_profiles.py

Lines changed: 1 addition & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -81,43 +81,7 @@ def test_StringColumnProfile(self):
8181
self.assertIsInstance(column_profile, StringColumnProfile)
8282
self.assertEqual(column_profile.minLength, 3)
8383
self.assertEqual(column_profile.maxLength, 4)
84-
self.assertEqual(
85-
str(column_profile),
86-
(
87-
'StringProfiles for column: a: {\n'
88-
' "completeness": 1.0,\n'
89-
' "approximateNumDistinctValues": 3,\n'
90-
' "dataType": "String",\n'
91-
' "isDataTypeInferred": false,\n'
92-
' "typeCounts": {\n'
93-
' "Boolean": 0,\n'
94-
' "Fractional": 0,\n'
95-
' "Integral": 0,\n'
96-
' "Unknown": 0,\n'
97-
' "String": 3\n'
98-
' },\n'
99-
' "histogram": [\n'
100-
' [\n'
101-
' "bazz",\n'
102-
' 1,\n'
103-
' 0.3333333333333333\n'
104-
' ],\n'
105-
' [\n'
106-
' "foo",\n'
107-
' 1,\n'
108-
' 0.3333333333333333\n'
109-
' ],\n'
110-
' [\n'
111-
' "bar",\n'
112-
' 1,\n'
113-
' 0.3333333333333333\n'
114-
' ]\n'
115-
' ],\n'
116-
' "minLength": 3,\n'
117-
' "maxLength": 4\n'
118-
'}'
119-
)
120-
)
84+
self.assertEqual(str(column_profile)[0:29], "StringProfiles for column: a:")
12185

12286
self.assertEqual(column_profile.completeness, 1.0)
12387
self.assertEqual(column_profile.approximateNumDistinctValues, 3)

0 commit comments

Comments
 (0)