diff --git a/.circleci/config.yml b/.circleci/config.yml index b112306b6fd..3fe53051f5b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -18,8 +18,11 @@ commands: name: Checkout merge branch command: | set -ex - git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} - git checkout "merged/$CIRCLE_BRANCH" + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [[ "$BRANCH" != "master" ]]; then + git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} + git checkout "merged/$CIRCLE_BRANCH" + fi binary_common: &binary_common parameters: diff --git a/.circleci/config.yml.in b/.circleci/config.yml.in index 52be9eef8fc..cb2d9125cc7 100644 --- a/.circleci/config.yml.in +++ b/.circleci/config.yml.in @@ -18,8 +18,11 @@ commands: name: Checkout merge branch command: | set -ex - git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} - git checkout "merged/$CIRCLE_BRANCH" + BRANCH=$(git rev-parse --abbrev-ref HEAD) + if [[ "$BRANCH" != "master" ]]; then + git fetch --force origin ${CIRCLE_BRANCH}/merge:merged/${CIRCLE_BRANCH} + git checkout "merged/$CIRCLE_BRANCH" + fi binary_common: &binary_common parameters: diff --git a/.travis.yml b/.travis.yml index e21981f2f67..d2c0a6648e7 100644 --- a/.travis.yml +++ b/.travis.yml @@ -76,7 +76,7 @@ install: cd - script: - - pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH test + - pytest --cov-config .coveragerc --cov torchvision --cov $TV_INSTALL_PATH -k 'not TestVideoReader and not TestVideoTransforms' test - pytest test/test_hub.py after_success: diff --git a/test/test_transforms_video.py b/test/test_transforms_video.py index b0a237e9318..193e71a3983 100644 --- a/test/test_transforms_video.py +++ b/test/test_transforms_video.py @@ -11,7 +11,7 @@ stats = None -class Tester(unittest.TestCase): +class TestVideoTransforms(unittest.TestCase): def test_random_crop_video(self): numFrames = random.randint(4, 128) diff --git a/torchvision/datasets/utils.py b/torchvision/datasets/utils.py index 84d9369c9e6..3b9a62c4463 100644 --- a/torchvision/datasets/utils.py +++ b/torchvision/datasets/utils.py @@ -229,7 +229,7 @@ def extract_archive(from_path, to_path=None, remove_finished=False): with tarfile.open(from_path, 'r:gz') as tar: tar.extractall(path=to_path) elif _is_tarxz(from_path) and PY3: - # .tar.xz archive only supported in Python 3.x + # .tar.xz archive only supported in Python 3.x with tarfile.open(from_path, 'r:xz') as tar: tar.extractall(path=to_path) elif _is_gzip(from_path):