Skip to content

Commit

Permalink
Revert "DEBUG"
Browse files Browse the repository at this point in the history
This reverts commit 95ff7c2.
  • Loading branch information
hagenw committed Dec 6, 2023
1 parent 95ff7c2 commit b33dd33
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 50 deletions.
52 changes: 26 additions & 26 deletions tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,30 +38,30 @@
)


# def uninstall(
# package: str,
# module: str,
# ):
# # uninstall package
# subprocess.check_call(
# [
# sys.executable,
# '-m',
# 'pip',
# 'uninstall',
# '--yes',
# package,
# ]
# )
# # remove module
# for m in list(sys.modules):
# if m.startswith(module):
# sys.modules.pop(m)
#
def uninstall(
package: str,
module: str,
):
# uninstall package
subprocess.check_call(
[
sys.executable,
'-m',
'pip',
'uninstall',
'--yes',
package,
]
)
# remove module
for m in list(sys.modules):
if m.startswith(module):
sys.modules.pop(m)

# @pytest.fixture(scope='session', autouse=True)
# def cleanup():
# yield
# # uninstall package temporarily installed by test_install.py
# uninstall('audbackend', 'audbackend')
# uninstall('dohq-artifactory', 'artifactory')

@pytest.fixture(scope='session', autouse=True)
def cleanup():
yield
# uninstall package temporarily installed by test_install.py
uninstall('audbackend', 'audbackend')
uninstall('dohq-artifactory', 'artifactory')
25 changes: 1 addition & 24 deletions tests/test_install.py
Original file line number Diff line number Diff line change
@@ -1,34 +1,11 @@
import os
import subprocess
import sys

# from conftest import uninstall
from conftest import uninstall
import pytest

import audobject


def uninstall(
package: str,
module: str,
):
# uninstall package
subprocess.check_call(
[
sys.executable,
'-m',
'pip',
'uninstall',
'--yes',
package,
]
)
# remove module
for m in list(sys.modules):
if m.startswith(module):
sys.modules.pop(m)


@pytest.mark.parametrize(
'yaml_s, package, module',
[
Expand Down

0 comments on commit b33dd33

Please sign in to comment.