import os
import pytest
from glob import glob
from psd2svg import psd2svg


FIXTURES = [
    'layer-effects.psd',
    'patterns.psd'
]

EXTERNAL_FIXTURES = [
    p for p in glob(os.path.join(
        os.getenv('PSD2SVG_FIXTURES_PATH', ''), '*.psd'))
    ]

@pytest.mark.parametrize('psd_file', FIXTURES)
def test_convert(tmpdir, psd_file):
    psd_path = os.path.join(os.path.dirname(__file__), 'fixtures', psd_file)
    psd2svg(psd_path, tmpdir.dirname)


@pytest.mark.parametrize('psd_path', EXTERNAL_FIXTURES)
def test_convert_external(tmpdir, psd_path):
    psd2svg(psd_path, tmpdir.dirname)

@@ -72,287 +72,49 @@
 vg%0A%0A
-%0AFIXTURES = %5B%0A    'layer-effects.psd',%0A    'patterns.psd'%0A%5D%0A%0AEXTERNAL_FIXTURES = %5B%0A    p for p in glob(os.path.join(%0A        os.getenv('PSD2SVG_FIXTURES_PATH', ''), '*.psd'))%0A    %5D%0A%0A@pytest.mark.parametrize('psd_file', FIXTURES)%0Adef test_convert(tmpdir, psd_file):%0A    psd_path =
+FIXTURES = %5B%0A    p for p in glob(%0A       
  os.
@@ -166,56 +166,23 @@
 s', 
-psd_file)%0A    psd2svg(psd_path, tmpdir.dirname)%0A
+'*.psd'))%0A    %5D
 %0A%0A@p
@@ -213,24 +213,15 @@
 psd_
-path', EXTERNAL_
+file', 
 FIXT
@@ -246,17 +246,8 @@
 vert
-_external
 (tmp
@@ -255,20 +255,20 @@
 ir, psd_
-path
+file
 ):%0A    p
@@ -278,20 +278,20 @@
 svg(psd_
-path
+file
 , tmpdir

Add all-convert test