예제 #1
0
 def test_write_stats_file(self) -> None:
     with TemporaryDirectory() as td:
         td_path = Path(td)
         jf_path = td_path / "unittest.json"
         stats = {"total": 69, "half": 35}
         ptr._write_stats_file(str(jf_path), stats)
         self.assertTrue(jf_path.exists())
예제 #2
0
 def test_write_stats_file_raise(self, mock_log: Mock) -> None:
     ptr._write_stats_file("/root/cooper69", {})
     self.assertTrue(mock_log.called)