File tree Expand file tree Collapse file tree 3 files changed +8
-12
lines changed
Expand file tree Collapse file tree 3 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -687,7 +687,7 @@ def to_api_repr(self) -> dict:
687687 A dictionary in the format used by the BigQuery API.
688688 """
689689 return copy .deepcopy (self ._properties )
690-
690+
691691 @classmethod
692692 def from_api_repr (cls , resource ):
693693 """Factory: constructs an instance of the class (cls)
Original file line number Diff line number Diff line change @@ -1166,13 +1166,9 @@ def test_from_api_repr(self):
11661166 THEN it will have the same representation a ForeignTypeInfo object created
11671167 directly (via _make_one()) and displayed as a dict.
11681168 """
1169- resource = {
1170- "typeSystem" : "TYPE_SYSTEM_UNSPECIFIED"
1171- }
1169+ resource = {"typeSystem" : "TYPE_SYSTEM_UNSPECIFIED" }
11721170
1173- expected = self ._make_one (
1174- type_system = "TYPE_SYSTEM_UNSPECIFIED"
1175- )
1171+ expected = self ._make_one (type_system = "TYPE_SYSTEM_UNSPECIFIED" )
11761172
11771173 klass = self ._get_target_class ()
11781174 result = klass .from_api_repr (resource )
@@ -1336,6 +1332,7 @@ def test_to_api_repr(self):
13361332
13371333 # TODO: needs a from_api_repr() test.
13381334
1335+
13391336# @pytest.fixture
13401337# def _make_foreign_type_info():
13411338# return ForeignTypeInfo(
@@ -1369,6 +1366,6 @@ def test_to_api_repr(self):
13691366
13701367# def test_to_api_repr(self):
13711368# assert False
1372-
1369+
13731370# def test_from_api_repr(self):
13741371# assert False
Original file line number Diff line number Diff line change @@ -574,7 +574,6 @@ def test_ctor_w_schema_klass(self):
574574 from google .cloud .bigquery .schema import SchemaField
575575 from google .cloud .bigquery .schema import Schema
576576
577-
578577 dataset = DatasetReference (self .PROJECT , self .DS_ID )
579578 table_ref = dataset .table (self .TABLE_NAME )
580579 full_name = SchemaField ("full_name" , "STRING" , mode = "REQUIRED" )
@@ -583,13 +582,13 @@ def test_ctor_w_schema_klass(self):
583582 schema = Schema (foreign_type_info = "EXAMPLE FTF" , fields = [full_name , age ])
584583
585584 table = self ._make_one (table_ref , schema = schema )
586- print (f"DINOSAUR: { schema } \n { dir (schema )} \n { type (schema )} \n { type (table .schema )} " )
585+ print (
586+ f"DINOSAUR: { schema } \n { dir (schema )} \n { type (schema )} \n { type (table .schema )} "
587+ )
587588 self .assertEqual (table .schema , [full_name , age ])
588589 # ADDITIONAL CHECK TEST
589590 self .assertEqual (table .schema .foreign_type_info , "EXAMPLE FTF" )
590591
591-
592-
593592 def test_ctor_string (self ):
594593 table = self ._make_one ("some-project.some_dset.some_tbl" )
595594 self .assertEqual (table .project , "some-project" )
You can’t perform that action at this time.
0 commit comments