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

Update 2p15 #1655

Merged
merged 3 commits 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
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@ repos:
exclude: "asdf/(extern||_jsonschema)/.*"

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.287'
rev: 'v0.0.288'
hooks:
- id: ruff
args: ["--fix"]

- repo: https://github.com/psf/black
rev: 23.7.0
rev: 23.9.1
hooks:
- id: black

Expand Down
2 changes: 1 addition & 1 deletion asdf/_tests/test_generic_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ def test_invalid_obj(tmp_path):


def test_nonseekable_file(tmp_path):
base = io.IOBase
base = io.FileIO

class FileWrapper(base):
def tell(self):
Expand Down
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 = ["asdftypes.py", "fits_embed.py", "resolver.py", "type_index.py", "types.py", "tests/helpers.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.