Skip to content

Commit 9c079e2

Browse files
Fix temp dir typing in policy_utils_test
test_convert_to_tflite creates a tempdir using absltest's create_tempdir function. It then passes this tempdir (which is a _Tempdir type) to a function expecting a string. This works, but should be using full_path to keep the internal type checker happy, which this commit does.
1 parent a7e3fdf commit 9c079e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

compiler_opt/es/policy_utils_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ def test_convert_to_tflite(self):
227227
output_bytes = self.params.tobytes()
228228

229229
scratch_dir = self.create_tempdir()
230-
tflite_dir = policy_utils.convert_to_tflite(output_bytes, scratch_dir,
230+
tflite_dir = policy_utils.convert_to_tflite(output_bytes,
231+
scratch_dir.full_path,
231232
saved_model_path)
232233

233234
self.assertTrue(os.path.exists(os.path.join(tflite_dir, 'model.tflite')))

0 commit comments

Comments
 (0)