henry000 commited on
Commit
a56a51f
·
1 Parent(s): 3b31306

✅ [Fix] test of dataset, order is not important

Browse files
tests/test_tools/test_data_loader.py CHANGED
@@ -66,4 +66,4 @@ def test_directory_stream_data_loader_frame(directory_stream_data_loader: Stream
66
  frame, rev_tensor, origin_frame = next(iter(directory_stream_data_loader))
67
  assert frame.shape == (1, 3, 640, 640)
68
  assert rev_tensor.shape == (1, 5)
69
- assert origin_frame.size == (480, 640)
 
66
  frame, rev_tensor, origin_frame = next(iter(directory_stream_data_loader))
67
  assert frame.shape == (1, 3, 640, 640)
68
  assert rev_tensor.shape == (1, 5)
69
+ assert origin_frame.size == (480, 640) or origin_frame.size == (512, 640)
tests/test_tools/test_dataset_preparation.py CHANGED
@@ -22,7 +22,8 @@ def test_prepare_dataset(train_cfg: Config):
22
  assert len(os.listdir(data_type)) == 5
23
 
24
  annotations_path = Path("tests/data/annotations")
25
- assert os.listdir(annotations_path) == ["instances_val.json", "instances_train.json"]
 
26
 
27
 
28
  def test_prepare_weight():
 
22
  assert len(os.listdir(data_type)) == 5
23
 
24
  annotations_path = Path("tests/data/annotations")
25
+ assert "instances_val.json" in os.listdir(annotations_path)
26
+ assert "instances_train.json" in os.listdir(annotations_path)
27
 
28
 
29
  def test_prepare_weight():