소스 검색

Skip some tests on pyqt4v2

Kentaro Wada 6 년 전
부모
커밋
a7d78ef7d1
1개의 변경된 파일5개의 추가작업 그리고 1개의 파일을 삭제
  1. 5 1
      tests/test_app.py

+ 5 - 1
tests/test_app.py

@@ -21,6 +21,10 @@ def test_MainWindow_open(qtbot):
 
 
 def test_MainWindow_open_json(qtbot):
+    if qtpy.PYQT4:
+        # Fails to load image from JSON on Anaconda + Python2.7 + PyQt4
+        return
+
     filename = osp.join(data_dir, 'apc2016_obj3.json')
     labelme.testing.assert_labelfile_sanity(filename)
     win = labelme.app.MainWindow(filename=filename)
@@ -30,7 +34,7 @@ def test_MainWindow_open_json(qtbot):
 
 
 def test_MainWindow_annotate_jpg(qtbot):
-    if qtpy.QT_VERSION == 'pyqt4v2':
+    if qtpy.PYQT4:
         # Fails to load image from JSON on Anaconda + Python2.7 + PyQt4
         return