Skip to content

Commit

Permalink
tests: rename setup/teardown functions for pytest 8.1.1 compatibility
Browse files Browse the repository at this point in the history
I don't know if that's intended, but nose-style setup() is no longer called.
  • Loading branch information
yuja committed Mar 10, 2024
1 parent f43171b commit 74e31ad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions tests/test_functional.py
Expand Up @@ -12,15 +12,15 @@
_fakecmd = os.path.join(os.path.dirname(__file__), 'fakecmd.py')


def setup():
def setup_module():
global _tempdir, _srcdir, _outdir
_tempdir = tempfile.mkdtemp()
_srcdir = os.path.join(_tempdir, 'src')
_outdir = os.path.join(_tempdir, 'out')
os.mkdir(_srcdir)


def teardown():
def teardown_module():
shutil.rmtree(_tempdir)


Expand Down
4 changes: 2 additions & 2 deletions tests/test_svgstyle.py
Expand Up @@ -5,12 +5,12 @@
from sphinxcontrib import plantuml


def setup():
def setup_module():
global _tempdir
_tempdir = tempfile.mkdtemp()


def teardown():
def teardown_module():
shutil.rmtree(_tempdir)


Expand Down

1 comment on commit 74e31ad

@mgorny
Copy link
Contributor

@mgorny mgorny commented on 74e31ad Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it was intended. Nose support was deprecated per pytest-dev/pytest#9886.

Please sign in to comment.