Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move conftest contents to asdf/conftest #1645

Merged
merged 1 commit into from
Sep 29, 2023
Merged
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
28 changes: 28 additions & 0 deletions asdf/conftest.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,32 @@
import os

import pytest

# We ignore these files because these modules create deprecation warnings on
# import. When warnings are turned into errors this will completely prevent
# test collection
collect_ignore = ["stream.py"]


@pytest.fixture(scope="session", autouse=True)
def _temp_cwd(tmpdir_factory):
"""
This fixture creates a temporary current working directory
for the test session, so that docstring tests that write files
don't clutter up the real cwd.
"""
original_cwd = os.getcwd()
try:
os.chdir(tmpdir_factory.mktemp("cwd"))
yield
finally:
os.chdir(original_cwd)


def pytest_addoption(parser):
parser.addoption(
"--jsonschema",
action="store_true",
default=False,
help="Run jsonschema test suite tests",
)
27 changes: 0 additions & 27 deletions conftest.py

This file was deleted.