Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -87,3 +87,6 @@ ENV/

# Rope project settings
.ropeproject

# Vim
.*.sw[op]
9 changes: 8 additions & 1 deletion pytest_pudb.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,20 @@ def pytest_addoption(parser):


def pytest_configure(config):

pudb_wrapper = PuDBWrapper(config)

if config.getvalue("usepudb"):
config.pluginmanager.register(pudb_wrapper, 'pudb_wrapper')

pudb_wrapper.mount()
config._cleanup.append(pudb_wrapper.unmount)

# pytest added `add_cleaup` function since v9, so keeping it backward
# compatible.
if hasattr(config, '_cleanup'):
config._cleanup.append(pudb_wrapper.unmount)
else:
config.add_cleanup(pudb_wrapper.unmount)


class PuDBWrapper(object):
Expand Down