def test_log_text(self):
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    with patch('polyaxon.tracking.run.Run._log_has_events') as log_text:
        self.run.log_text(name='my_text', text='some text', step=1)
    assert (log_text.call_count == 1)
    self.event_logger.flush()
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.TEXT)) is True)
    events_file = get_event_path(self.run_path, kind=V1ArtifactKind.TEXT, name='my_text')
    assert (os.path.exists(events_file) is True)
    results = V1Events.read(kind='text', name='my_text', data=events_file)
    assert (len(results.df.values) == 1)
def test_log_text(self):
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    with patch('polyaxon.tracking.run.Run._log_has_events') as log_text:
        self.run.log_text(name='my_text', text='some text', step=1)
    assert (log_text.call_count == 1)
    self.event_logger.flush()
    assert (os.path.exists(get_asset_path(self.run_path, kind=V1ArtifactKind.TEXT)) is False)
    assert (os.path.exists(get_event_path(self.run_path, kind=V1ArtifactKind.TEXT)) is True)
    events_file = get_event_path(self.run_path, kind=V1ArtifactKind.TEXT, name='my_text')
    assert (os.path.exists(events_file) is True)
    results = V1Events.read(kind='text', name='my_text', data=events_file)
    assert (len(results.df.values) == 1)