1- from sql_mock .bigquery .column_mocks import Array , BigQueryColumnMock , Decimal
1+ from sql_mock .bigquery .column_mocks import Array , BigQueryColumnMock , Decimal , Int , String
22
33
4- def test_init_not_nullable ():
4+ def test_init_nullable ():
55 """
6- ...then nullable should be False and dtype be the same as passed.
6+ ...then nullable should be True and dtype be the same as passed.
77 """
88
99 class ColMock (BigQueryColumnMock ):
@@ -13,22 +13,22 @@ class ColMock(BigQueryColumnMock):
1313
1414 assert column .default == 42
1515 assert column .dtype == "Integer"
16- assert not column .nullable
16+ assert column .nullable
1717
1818
19- def test_init_nullable ():
19+ def test_init_not_nullable ():
2020 """
21- ...then nullable should be True "
21+ ...then nullable should be False "
2222 """
2323
2424 class ColMock (BigQueryColumnMock ):
2525 dtype = "Integer"
2626
27- column = ColMock (default = 42 , nullable = True )
27+ column = ColMock (default = 42 , nullable = False )
2828
2929 assert column .default == 42
3030 assert column .dtype == "Integer"
31- assert column .nullable
31+ assert not column .nullable
3232
3333
3434class TestDecimalColumn :
@@ -49,8 +49,8 @@ def test_decimal_initialization_nullable(self):
4949
5050def test_array_column_inner_dtype ():
5151 """Ensure that the inner dtype is processed correctly"""
52- string_array_col = Array (inner_dtype = " String" , default = ["a" , "b" ], nullable = True )
53- int_array_col = Array (inner_dtype = "Integer" , default = [1 , 2 ], nullable = False )
52+ string_array_col = Array (inner_type = String , default = ["a" , "b" ], nullable = True )
53+ int_array_col = Array (inner_type = Int , default = [1 , 2 ], nullable = False )
5454
5555 assert string_array_col .dtype == "Array<String>"
5656 assert string_array_col .default == ["a" , "b" ]
0 commit comments