MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / _upgrade

Method _upgrade

tensorflow/tools/compatibility/ast_edits_test.py:179–186  ·  view source on GitHub ↗
(self, spec, old_file_text)

Source from the content-addressed store, hash-verified

177class TestAstEdits(test_util.TensorFlowTestCase):
178
179 def _upgrade(self, spec, old_file_text):
180 in_file = six.StringIO(old_file_text)
181 out_file = six.StringIO()
182 upgrader = ast_edits.ASTCodeUpgrader(spec)
183 count, report, errors = (
184 upgrader.process_opened_file("test.py", in_file,
185 "test_out.py", out_file))
186 return (count, report, errors), out_file.getvalue()
187
188 def testModuleDeprecation(self):
189 text = "a.b.c(a.b.x)"

Calls 1

process_opened_fileMethod · 0.95

Tested by

no test coverage detected