import os
import sys
from pathlib import Path

import pytest


if sys.version_info < (3, 4):
    print("Requires Python 3.4+")
    sys.exit(1)


TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)


@pytest.fixture
def resources():
    return Path(TESTS_ROOT) / 'resources'


@pytest.fixture(scope="function")
def outdir(tmp_path):
    return tmp_path


@pytest.fixture(scope="function")
def outpdf(tmp_path):
    return tmp_path / 'out.pdf'

import os
import sys
from pathlib import Path

import pytest

if sys.version_info < (3, 4):
    print("Requires Python 3.4+")
    sys.exit(1)


TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)


@pytest.fixture(scope="session")
def resources():
    return Path(TESTS_ROOT) / 'resources'


@pytest.fixture(scope="function")
def outdir(tmp_path):
    return tmp_path


@pytest.fixture(scope="function")
def outpdf(tmp_path):
    return tmp_path / 'out.pdf'

Fix warning from hypothesis above scope of resources() fixture
Fix warning from hypothesis above scope of resources() fixture

  import os
  import sys
  from pathlib import Path
  
  import pytest
- 
  
  if sys.version_info < (3, 4):
      print("Requires Python 3.4+")
      sys.exit(1)
  
  
  TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
  PROJECT_ROOT = os.path.dirname(TESTS_ROOT)
  
  
- @pytest.fixture
+ @pytest.fixture(scope="session")
  def resources():
      return Path(TESTS_ROOT) / 'resources'
  
  
  @pytest.fixture(scope="function")
  def outdir(tmp_path):
      return tmp_path
  
  
  @pytest.fixture(scope="function")
  def outpdf(tmp_path):
      return tmp_path / 'out.pdf'
  
Fix warning from hypothesis above scope of resources() fixture
## Code Before:
import os
import sys
from pathlib import Path

import pytest


if sys.version_info < (3, 4):
    print("Requires Python 3.4+")
    sys.exit(1)


TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)


@pytest.fixture
def resources():
    return Path(TESTS_ROOT) / 'resources'


@pytest.fixture(scope="function")
def outdir(tmp_path):
    return tmp_path


@pytest.fixture(scope="function")
def outpdf(tmp_path):
    return tmp_path / 'out.pdf'

## Instruction:
Fix warning from hypothesis above scope of resources() fixture
## Code After:
import os
import sys
from pathlib import Path

import pytest

if sys.version_info < (3, 4):
    print("Requires Python 3.4+")
    sys.exit(1)


TESTS_ROOT = os.path.abspath(os.path.dirname(__file__))
PROJECT_ROOT = os.path.dirname(TESTS_ROOT)


@pytest.fixture(scope="session")
def resources():
    return Path(TESTS_ROOT) / 'resources'


@pytest.fixture(scope="function")
def outdir(tmp_path):
    return tmp_path


@pytest.fixture(scope="function")
def outpdf(tmp_path):
    return tmp_path / 'out.pdf'
