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

DM-11514: Fix a race condition in tests under pytest-xdist #273

Merged
merged 11 commits into from
Aug 19, 2017

Commits on Aug 18, 2017

  1. Use unique filename for each apCorrMap file test

    pytest can result in tests from the same class running in parallel,
    leading to a race where one test writes the file and the other
    test removes it before it can be read. The simplest solution
    is to use distinct file names for each of the tests.
    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    8e10e8f View commit details
    Browse the repository at this point in the history
  2. Use __file__ rather than AFW_DIR

    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    594ead1 View commit details
    Browse the repository at this point in the history
  3. Use assertEqual rather than assertEquals

    The latter is deprecated in python3
    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    7ee4956 View commit details
    Browse the repository at this point in the history
  4. Use assertAlmostEqual rather than assertAlmostEquals

    The latter is deprecated in python3
    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    a45d6c0 View commit details
    Browse the repository at this point in the history
  5. Close the file that was opened to read the catalog

    Failing to do this results in a resource warning.
    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    ef40159 View commit details
    Browse the repository at this point in the history
  6. Use with to create temp file

    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    8ece6ce View commit details
    Browse the repository at this point in the history
  7. Use with open context manager

    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    11bdfea View commit details
    Browse the repository at this point in the history
  8. Close the pyfits FITS file

    This fixes a resource warning.
    timj committed Aug 18, 2017
    Configuration menu
    Copy the full SHA
    a4bb9a3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    983f9da View commit details
    Browse the repository at this point in the history

Commits on Aug 19, 2017

  1. Fix some warnings from tests

    timj committed Aug 19, 2017
    Configuration menu
    Copy the full SHA
    6e87e66 View commit details
    Browse the repository at this point in the history
  2. Ensure that deprecation warnings report the caller

    Without a third argument the line number reported by the
    deprecation warnings is the line number of the warning itself.
    This is not useful to a developer trying to determine which
    method was deprecated. This changes the situation so that
    the caller line number is reported by setting stacklevel=2.
    timj committed Aug 19, 2017
    Configuration menu
    Copy the full SHA
    1e68ab8 View commit details
    Browse the repository at this point in the history