File: test_imagesize.py

package info (click to toggle)
python-textile 1%3A4.0.3-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 460 kB
  • sloc: python: 2,791; makefile: 17; sh: 7
file content (16 lines) | stat: -rw-r--r-- 396 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
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.utils.getimagesize(imgurl)
    try:
        import PIL  # noqa: F401

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