Skip to content

Commit

Permalink
Merge pull request #1655 from braingram/update_2p15
Browse files Browse the repository at this point in the history
Update 2p15
  • Loading branch information
braingram authored Sep 29, 2023
2 parents fa6bd16 + 30b844c commit f1f18e8
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 30 deletions.
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.

0 comments on commit f1f18e8

Please sign in to comment.