@@ -20,7 +20,7 @@ def test_upsert_unnamed_vectors(qdrant: Qdrant, spark_session: SparkSession):
2020 "embedding_field" , "dense_vector"
2121 ).mode ("append" ).option ("schema" , df .schema .json ()).save ()
2222
23- qdrant .client .count (qdrant .collection_name ) == df .count ()
23+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
2424
2525
2626def test_upsert_named_vectors (qdrant : Qdrant , spark_session : SparkSession ):
@@ -38,7 +38,8 @@ def test_upsert_named_vectors(qdrant: Qdrant, spark_session: SparkSession):
3838 "append"
3939 ).save ()
4040
41- qdrant .client .count (qdrant .collection_name ) == df .count ()
41+ assert qdrant .client .count (qdrant .collection_name ).count == df .count (), "Uploaded points count is not equal to the dataframe count"
42+
4243
4344
4445def test_upsert_multiple_named_dense_vectors (
@@ -58,7 +59,7 @@ def test_upsert_multiple_named_dense_vectors(
5859 "schema" , df .schema .json ()
5960 ).mode ("append" ).save ()
6061
61- qdrant .client .count (qdrant .collection_name ) == df .count ()
62+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
6263
6364
6465def test_upsert_sparse_vectors (qdrant : Qdrant , spark_session : SparkSession ):
@@ -76,7 +77,7 @@ def test_upsert_sparse_vectors(qdrant: Qdrant, spark_session: SparkSession):
7677 "sparse_vector_names" , "sparse"
7778 ).option ("schema" , df .schema .json ()).mode ("append" ).save ()
7879
79- qdrant .client .count (qdrant .collection_name ) == df .count ()
80+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
8081
8182
8283def test_upsert_multiple_sparse_vectors (qdrant : Qdrant , spark_session : SparkSession ):
@@ -94,7 +95,7 @@ def test_upsert_multiple_sparse_vectors(qdrant: Qdrant, spark_session: SparkSess
9495 "sparse_vector_names" , "sparse,another_sparse"
9596 ).option ("schema" , df .schema .json ()).mode ("append" ).save ()
9697
97- qdrant .client .count (qdrant .collection_name ) == df .count ()
98+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
9899
99100
100101def test_upsert_sparse_named_dense_vectors (qdrant : Qdrant , spark_session : SparkSession ):
@@ -114,7 +115,7 @@ def test_upsert_sparse_named_dense_vectors(qdrant: Qdrant, spark_session: SparkS
114115 "sparse_vector_names" , "sparse"
115116 ).option ("schema" , df .schema .json ()).mode ("append" ).save ()
116117
117- qdrant .client .count (qdrant .collection_name ) == df .count ()
118+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
118119
119120
120121def test_upsert_sparse_unnamed_dense_vectors (
@@ -136,7 +137,7 @@ def test_upsert_sparse_unnamed_dense_vectors(
136137 "append"
137138 ).save ()
138139
139- qdrant .client .count (qdrant .collection_name ) == df .count ()
140+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
140141
141142
142143def test_upsert_multiple_sparse_dense_vectors (
@@ -158,7 +159,7 @@ def test_upsert_multiple_sparse_dense_vectors(
158159 "sparse_vector_names" , "sparse,another_sparse"
159160 ).option ("schema" , df .schema .json ()).mode ("append" ).save ()
160161
161- qdrant .client .count (qdrant .collection_name ) == df .count ()
162+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
162163
163164
164165# Test an upsert without vectors. All the dataframe fields will be treated as payload
@@ -175,7 +176,7 @@ def test_upsert_without_vectors(qdrant: Qdrant, spark_session: SparkSession):
175176 "schema" , df .schema .json ()
176177 ).mode ("append" ).save ()
177178
178- qdrant .client .count (qdrant .collection_name ) == df .count ()
179+ assert qdrant .client .count (qdrant .collection_name ). count == df .count (), "Uploaded points count is not equal to the dataframe count"
179180
180181
181182def test_custom_id_field (qdrant : Qdrant , spark_session : SparkSession ):
0 commit comments