Skip to content

Commit

Permalink
Remove test artifacts (#672)
Browse files Browse the repository at this point in the history
* remove test artifacts
  • Loading branch information
lanpa committed Aug 28, 2022
1 parent 9124a06 commit 766a47d
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 2 additions & 0 deletions tests/test_record_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
from tensorboardX.record_writer import S3RecordWriter, make_valid_tf_name, GCSRecordWriter
import os
import boto3
import shutil
from moto import mock_s3

os.environ.setdefault("AWS_ACCESS_KEY_ID", "foobar_key")
Expand All @@ -20,6 +21,7 @@ def test_record_writer_s3(self):
assert path == 'is/apen'
writer.write(bytes(42))
writer.flush()
shutil.rmtree('s3:')

def test_make_valid_tf_name(self):
newname = make_valid_tf_name('$ave/&sound')
Expand Down
6 changes: 4 additions & 2 deletions tests/test_writer.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from tensorboardX import SummaryWriter
from tensorboard.compat.tensorflow_stub.pywrap_tensorflow import PyRecordReader_New
from tensorboardX.proto import event_pb2

import os
import numpy as np
import pytest
import unittest
Expand Down Expand Up @@ -110,8 +110,10 @@ def test_writer(self):
recall, n_iter)
# export scalar data to JSON for external processing
writer.export_scalars_to_json("./all_scalars.json")
os.remove("./all_scalars.json")
imgs = []
for i in range(5):
imgs.append(np.ones((3, 100, 110)))
with SummaryWriter() as w:
w.add_images('img_list', imgs, dataformats='CHW')
w.add_images('img_list', imgs, dataformats='CHW')

0 comments on commit 766a47d

Please sign in to comment.