File: test_imagesize.py

package info (click to toggle)
python-textile 1%3A2.3.5-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 444 kB
  • ctags: 233
  • sloc: python: 2,320; makefile: 4
file content (15 lines) | stat: -rw-r--r-- 391 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import textile
import pytest

@pytest.mark.skip("Requires network access")
def test_imagesize():
    imgurl = 'http://www.google.com/intl/en_ALL/images/srpr/logo1w.png'
    result = textile.tools.imagesize.getimagesize(imgurl)
    try:
        import PIL

        expect = (275, 95)
        assert result == expect
    except ImportError:
        expect = ''
        assert result == expect