Skip to content

Commit

Permalink
DEBUG
Browse files Browse the repository at this point in the history
  • Loading branch information
hagenw committed Dec 6, 2023
1 parent 35a233d commit 95ff7c2
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 27 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: 24 additions & 1 deletion tests/test_install.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,34 @@
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 95ff7c2

Please sign in to comment.