Ecosyste.ms: OpenCollective

An open API service for software projects hosted on Open Collective.

github.com/astropy/pytest-openfiles

Pytest plugin to check for files left open at the end of a test run
https://github.com/astropy/pytest-openfiles

Removes some more unused imports that were found with pylint. I don't *think* this breaks anything but I'll be interested to see what the CI systems say

692ef8800998b0f3eeef8bab684849df669f9b57 authored about 11 years ago by Erik M. Bray <[email protected]>
Phase 2: This moves inline imports of any standard library modules that are guaranteed to be imported during 'import astropy' regardless, and don't in general make sense to have as inline imports. Numpy is included in this as well, though there are a few places where Numpy shouldn't be imported (such as in modules that might be imported at setup-time when Numpy might not be installed). There are few other exceptions too, but not many.

df1ac0900474625d863499e22edb76a3e602f904 authored about 11 years ago by Erik M. Bray <[email protected]>
First round of relocating inline imports; this specifically focuses on modules that are already imported, in general, when you first start the Python interpreter. So in most cases there's not much point in burying them in function calls because those modules are guaranteed to always be imported to begin with.

6c79295a6c0e86a7f150a0f0e40c4f33ce6a80c3 authored about 11 years ago by Erik M. Bray <[email protected]>
Fixed a bug that was causing the tests not to run on Windows, specifically on Python < 2.7.3. This was due to a call to shlex.split which, according to the Python docs, did not support unicode strings prior to 2.7.3. We were encoding the string as utf8 for Python 2.6, but it really should have been Python < 2.7.3. Incidentally the Windows XP test machine is still running Python 2.7.2 which is how this came up. This isn't the first time that shlex.split call has caused problems either, leading me to wonder if we should be building up a string and then splitting it with shlex, rather than just adding the arguments to a list in the first place... But this fixes the issue for now (Windows has some other tests that seem to be failing, but at least with this fix the tests run)

d2d55825644cba5722f98ac94f19dacaec79296c authored about 11 years ago by Erik Bray <[email protected]>
Reset warnings and sys modules completely before and after logging tests to avoid side effects.

09eaa287928e03c32aaa54726c365e546a03d636 authored about 11 years ago by Thomas Robitaille <[email protected]>
Fixup arguments to assert_follows_unicode_guidelines

fa4d401f1c51cfca7a19ec63d3205469491b71c3 authored about 11 years ago by Michael Droettboom <[email protected]>
Do all roundtrip testing or none.

0bdab998ee7f2572494ee8529cf711a51e568d21 authored about 11 years ago by Michael Droettboom <[email protected]>
Write Unicode guidelines. Add UNICODE_OUTPUT config option. Add test

helper to test against guidelines. Modify astropy.units.Unit to follow
those guidelines, and fix...

237f3cf68de1a66f517b22a9158db0e9b2794c59 authored about 11 years ago by Michael Droettboom <[email protected]>
Add documentation for repr_namespace

1facf62ae688a36fdc79ea519256f72430eca871 authored about 11 years ago by Michael Droettboom <[email protected]>
Test roundtrip of __repr__ as well.

3b0d1603a945c76ba87b42d57e83df18fa379b78 authored about 11 years ago by Michael Droettboom <[email protected]>
Move sys.stdout.encoding to top of function

ce28f84b440a4946cdde6f22254c22650eccdd86 authored about 11 years ago by Erik Tollerud <[email protected]>
use or syntax instead of if statements

4f69c993c56cfb685ba876ca534c18e7b20b1c6e authored about 11 years ago by Erik Tollerud <[email protected]>
check for stdout.encoding before doing encoding in pytest

8c191793f3ff7d970c3fe72da671a089276fcc9e authored about 11 years ago by Erik Tollerud <[email protected]>
PEP8 fixes in astropy.tests

360fd5b42457eef55a2a95dcbeeeb53634b7e4a7 authored about 11 years ago by Thomas Robitaille <[email protected]>
Indent with 4 spaces.

082fe788a5aca19f0fa55935f9feded5b73d2d92 authored about 11 years ago by Christoph Deil <[email protected]>
For Python 2, fix the paths to use the source files, otherwise coverage report is full of temporary file paths.

d0dab0eb28097547e438e33feb084ce5ea3bf51b authored about 11 years ago by Thomas Robitaille <[email protected]>
Enable coverage testing and publishing to coveralls.io

779d305bc1e4b14560275a779a4886195147f277 authored about 11 years ago by Thomas Robitaille <[email protected]>
Merge pull request #1533 from astrofrog/fix-catch-warning-issue

Make sure the list of modules being iterated over cannot change during iteration

2d9affd54c2fcb32fbee03023d57382c9f04ed3b authored about 11 years ago by Michael Droettboom <[email protected]>
Make sure the list of modules being iterated over cannot change during the iteration.

ffbd13774af83106633b8b7b58f1a7b47efd3458 authored about 11 years ago by Thomas Robitaille <[email protected]>
Merge pull request #1531 from mdboom/tests/fix-pytest-on-py3.1

Restore compatibility with Python 3.1?

90812a308f7bcffa5e31ebf89367c4449c70af1a authored about 11 years ago by Thomas Robitaille <[email protected]>
Fix py.test 2.4.0 on Python 3.1

36993c98575443d9e8209f0c55ba92435df33594 authored about 11 years ago by Michael Droettboom <[email protected]>
Fix decoding of platform name.

95e09ca3f31197b389aa835d760c4f34fc213499 authored about 11 years ago by Michael Droettboom <[email protected]>
Merge pull request #1510 from mdboom/tests/six

Update astropy.tests to use six instead of 2to3

57277ca35be601ae809ea2b73a0d258bfc406882 authored about 11 years ago by Michael Droettboom <[email protected]>
Remove debugging print statements

0a7b6cbc43f52158625d682c2e1bdbc35c3781fc authored about 11 years ago by Michael Droettboom <[email protected]>
Attempts to fix

1860c03161b0dc34e5461e16e86d040531861fb4 authored about 11 years ago by Michael Droettboom <[email protected]>
Moved content of utils.custom_warnings into utils.exceptions

485904c786c6e239767158579c0f9c6aebe8a513 authored about 11 years ago by Thomas Robitaille <[email protected]>
Fix distutils arguments

d6e86b199d283e43d45e8c6b4b8ae6f59f7125e9 authored about 11 years ago by Michael Droettboom <[email protected]>
Update astropy.tests to use six instead of 2to3

88603255fd6b577a09bee0a0f8bf8dbc22ecf044 authored about 11 years ago by Michael Droettboom <[email protected]>
Try to get more info out of Travis

6a59a764e5c0d197241e21f213eb51ca8f67a753 authored about 11 years ago by Michael Droettboom <[email protected]>
Fixed more failures. For some reason, we now need to use the ``msg`` attribute on ``LogRecord`` (which is according to the documentation, the normal way to do this - not sure how it worked before)

c430ca8405efb686ab21eed46c77739f14c8a0a5 authored about 11 years ago by Thomas Robitaille <[email protected]>
The reason for the change in API in the previous commit was that the formatter is responsible for creating the .message attribute but now we have turned off the file logger by default, the _stream_formatter is the only formatter left by default, and it wasn't creating .message.

48b09631a981fd120ed6bcfeebb1b780d9043c7b authored about 11 years ago by Thomas Robitaille <[email protected]>
Added test to ensure warnings that don't sub-class from Astropy don't get interpreted by the logger.

789976e1c41794ab1f041ed6a29264ce9cc2330a authored about 11 years ago by Thomas Robitaille <[email protected]>
Most warnings should actually be AstropyUserWarning (since default for warnings.warn is UserWarning)

dd441b052a0188824e49eeb53c1a65628167134b authored about 11 years ago by Thomas Robitaille <[email protected]>
Fixed more warnings

cf4f2050f9b5437b2266fe8456237b3fbf226acf authored about 11 years ago by Thomas Robitaille <[email protected]>
Ensure all custom warnings inherit from AstropyWarning instead of Warning

83a13dd430259d2afb06bd5dc3ed518f7b262487 authored about 11 years ago by Thomas Robitaille <[email protected]>
Merge pull request #1479 from mdboom/misc/remove-numpy-14

Warning if Numpy < 1.5 is used

2a721a84659b1dc4100c2aaa4f1eb4851080c3e1 authored about 11 years ago by Michael Droettboom <[email protected]>
Don't run all of the doctests twice

a17bc115196063909835926a009e504a30a51640 authored about 11 years ago by Michael Droettboom <[email protected]>
Make tests compatible with pytest 2.4.0

8b23f5b09154ab2a1ea14af353904b5313433394 authored about 11 years ago by Michael Droettboom <[email protected]>
Update the minimum Numpy version to 1.5.

Remove workarounds and "knownfail" tests for Numpy 1.4.

Add an explicit check for the correct v...

15953d8082c8bc9a945a0ab0ba10860c3644a41d authored about 11 years ago by Michael Droettboom <[email protected]>
Fixes the tests in question by not assuming that the default log level is INFO

b235ec6088999a4624f76f663e3fede77bf41c78 authored over 11 years ago by Erik M. Bray <[email protected]>
Restore the original log level after each of these tests; this still didn't solve the issue but it seems worthwhile

9a54a58ab4bf73b9191fc2e3165295e2a9cab53c authored over 11 years ago by Erik M. Bray <[email protected]>
Cleanup the top-level astropy namespace so it doesn't have any miscellaneous stuff

343030c5e5fc5da709054ca5299f865700302d73 authored over 11 years ago by Michael Droettboom <[email protected]>
Fix reporting of h5py version in the test runner for older versions of h5py.

1518d4da862d8ea91ccb2b49a10e9797b526659d authored over 11 years ago by Erik M. Bray <[email protected]>
Added some basic documentation on writing doctests to the Astropy developer

docs, mostly just linking to the doctest documentation in Python since it's
pretty okay. Also ren...

2a3aeee00cfe430958cd81c2b7e5848ea6532bc4 authored over 11 years ago by Erik M. Bray <[email protected]>
Extend the '__doctest_skip__' feature to allow skipping doctests in module docstrings.

7b284968c7ae5c297799850596b384748e4f5d28 authored over 11 years ago by Erik M. Bray <[email protected]>
Reorganized the doctest plus plugin into a class. Considering spinning this off into its own module.

92c7873a72e03b1ad443f00808ed22a2f7c21e56 authored over 11 years ago by Erik M. Bray <[email protected]>
Because putting addopts = --doctest-plus does not work when running py.test by itself (the new options aren't picked up soon enough), here instead is a setup.cfg option to enable doctest_plus as well.

7797ace65580be30a89fcec34f8d050847f7b778 authored over 11 years ago by Erik M. Bray <[email protected]>
Adds a new \ module-level global understood by the doctestplus plugin. This skips certain tests if one or more listed modules can't be imported. Perhaps this could later be expanded to support other kinds of environment markers (as supported by pytest.skipif) but this is sufficient for now to disable tests that blow up if certain optional dependencies (like scipy) are missing.

f5661e612617e39f746a9458d214db510f4b026c authored over 11 years ago by Erik M. Bray <[email protected]>
Added the proposed doctest_norecursedirs for outright skipping any directories where doctests that shouldn't be scanned for doctests (aside from the ones already listed in the general norecursedirs)

4778433b4077b02255d5b97648d1b6b629c25a5c authored over 11 years ago by Erik M. Bray <[email protected]>
Fixed or skipped the remaining doctests that weren't working on 2.7. Didn't put a lot of thought into most of these, but if we end up enabling doctest in the future and maybe documenting some guidelines for how to write them we can be more thoughtful about that in the future

1a1e3e59258df59bd73d04069440b92bb40c59c5 authored over 11 years ago by Erik M. Bray <[email protected]>
Adds a new py.test plugin which implements a replacement/enhancement to the --doctest-modules called --doctest-plus (the name can be debated, it was just the first thing that popped into my head) which enables a special __doctest_skip__ module-level variable that makes it easy to skip testing doctest-like strings without littering the docs with '# doctest: +SKIP' directives.

9e8925bf9ff0693999192ed14e741da6f0b81a27 authored over 11 years ago by Erik M. Bray <[email protected]>
By testing out of a temp dir we lose any pytest config values specified in setup.cfg, because py.test recurses from the test dir to find the config file, not your pwd when you first start it. So it's necessary that we copy the setup.cfg into the testing path as well.

460615bb9c450338389e76f7c7a7ca3e6f704f4c authored over 11 years ago by Erik M. Bray <[email protected]>
Add a custom version of catch_warnings that clears all warning state first so that we can reproducibly get all warnings everytime.

a70d408f6c3ae48043927a660d246fe7aedec6e0 authored over 11 years ago by Michael Droettboom <[email protected]>
Expose parallel testing support at the command line

f124870fd78636d37fa1e5b41265f7f3f00789b8 authored over 11 years ago by Michael Droettboom <[email protected]>
Fix --coverage for Python 3.x

0d6e16608e455012f2645bdb24ebf8854278c67f authored over 11 years ago by Thomas Robitaille <[email protected]>
PEP8 fixes in astropy/tests

b9e87b22e85727ba5a5c1dbc0305385b975ac11d authored over 11 years ago by Thomas Robitaille <[email protected]>
Merge pull request #1100 from mdboom/testing/show-encodings

Add more useful information to testing header

f912be68f301c558bbc6a76ed2cb047cd8263930 authored over 11 years ago by Erik Bray <[email protected]>
This fixes the issue for me, though it requires monkey-patching an internal function in py.test :( I'll see if we can get this fixed upstream and then when we next upgrade py.test we can take this out.

85a654621b34de9d548ef73017035dda8a6e302b authored over 11 years ago by Erik M. Bray <[email protected]>
Adds a little more detailed explanation about what this patch is and why it's here.

2b1aef4a61f3a001c98b847234652a21dab87e12 authored over 11 years ago by Erik M. Bray <[email protected]>
Also this should be a new-style class

62add7ce26428860901a2e26c0b5d57611de8ae8 authored over 11 years ago by Erik M. Bray <[email protected]>
Add more useful information to testing header -- encoding info, float info and endianness.

9474710d6b570f94d1d7dd9e7c82056e20c6fbf2 authored over 11 years ago by Michael Droettboom <[email protected]>
Fix pytest imports

a1fba5e852042ee7d078c47d82e1a974aebcdb2c authored over 11 years ago by Thomas Robitaille <[email protected]>
Added Matplotlib version to astropy.test() header

40ac0bf9e2ec342bcbe30983428bebed2d992461 authored over 11 years ago by Thomas Robitaille <[email protected]>
Add more system/dependency information to py.test output

f560d49eb155ac1d6bf61cef0de01365f681f206 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #813 from eteq/fix-issue-813

Minor fix needed in py.test message

c5f186cf649b235559901986c1a1aebbd9ce33db authored almost 12 years ago by Thomas Robitaille <[email protected]>
Update the changelog in master to reflect the release of 0.2. This should really have been done immediately after the release. I will update the release procedures to include a step like this.

b6d5ec8a2ca4c83e30b13a2240f9e656f65553a4 authored almost 12 years ago by Erik M. Bray <[email protected]>
changed test-running message to work better with affiliated packages

ea821ed4de09b9621ca3a85a87fd8cc5417487bc authored almost 12 years ago by Erik Tollerud <[email protected]>
Merge pull request #782 from eteq/fix-failing-open-file-test

Fix failing open file test

753e662ba7ea2ca41dc4d2f799b97f3e5098d2e2 authored almost 12 years ago by Erik Bray <[email protected]>
fix another typo related to subprocesses in open file detection

b81253b6ffcc9db09208add6417b3e2fbbbec5a0 authored almost 12 years ago by Erik Tollerud <[email protected]>
Fix a typo that was breaking the open files test

8ce0b18be41a572d371fb6615b534d4629e18f8d authored almost 12 years ago by Erik Tollerud <[email protected]>
Merge pull request #776 from astrofrog/skip-logging-tests-ipython

Two tests failing in 0.2rc1

5baed85338214ebb6b6cadffd13f872a30c9c58b authored almost 12 years ago by Erik Bray <[email protected]>
Mark two logging tests as xfail if run from IPython since the exception overriding doesn't work when using py.test and IPython

c8b8a59c34bcf493ff39021a67bae4c213d59dd2 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #769 from iguananaut/issue-769

0.2b2 doesn't install on python 2.6

c4d67fa1b8f54115342aaa46b654b2add129e51c authored almost 12 years ago by Erik Bray <[email protected]>
Fixes the issue reported in #769, and a few other uses of check_output which won't work on Python 2.6

0be254ea408efda12fce3f4964a052b518b794db authored almost 12 years ago by Erik M. Bray <[email protected]>
Merge pull request #697 from mdboom/testing/open-files-testing-in-travis

Turn on open file testing in Travis
Conflicts:

.travis.yml

b646614e01cb9ae567bc5fb0a3bf8778407ad4e3 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #720 from astrofrog/tests/add-test-keyword-names

Explicitly list keyword arguments when calling test()

5153e1b40799dd601f6cab9bd8d7916e8f10be65 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Turn on open file testing in Travis

9c36c7fda394660bf184df0206fe006702713c8a authored almost 12 years ago by Michael Droettboom <[email protected]>
Explicitly list keywords when calling test(), otherwise affiliated packages will not be robust to additional keywords - they use **kwargs to capture any additional arguments, but this only works when listing the keyword arguments.

d5da4a4aecfbda08cbb55d169ff1b8d215f0e381 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #673 from mdboom/testing/open-files-lsof

Adds "unclosed file detection" to the test framework using lsof

8df15b31e58732cef3c10243c2b48cc319cb7908 authored almost 12 years ago by Michael Droettboom <[email protected]>
Python 3 fixes

cdceba6d25168a51f293eacd55e37d904e31dc6c authored almost 12 years ago by Michael Droettboom <[email protected]>
Check that we can successfully run lsof

62c139aa66b0b6c02a0b472be586346e69f49c76 authored almost 12 years ago by Michael Droettboom <[email protected]>
Add "unclosed file detection" to the testing framework.

Fix unclosed file bug in logger.py
Fix unclosed file bug in wcs.
Fix unclosed file bug in io.asc...

c495e9acea3ec831b066e43ff982558d03cf91ec authored almost 12 years ago by Michael Droettboom <[email protected]>
Update to alternate implementation that uses lsof

4883f2e288bf5f5457e37bc02d1bb642af0a5db7 authored almost 12 years ago by Michael Droettboom <[email protected]>
Fix for Python 3 -- use a slice rather than a single element to keep things as byte strings

e183d2f1ca2f4e9cc6aa3b4badebde3e46d56cb7 authored almost 12 years ago by Michael Droettboom <[email protected]>
Merge pull request #458 from eteq/test-imports-2

added test_imports to make sure all packages successfully import

c13efb58aebee5447426440fc92a1475164f4ac6 authored almost 12 years ago by Erik Bray <[email protected]>
Merge pull request #625 from astrofrog/add-license-line

Added LICENSE line to files that were missing it
Conflicts:

astropy/utils/tests/test_collectio...

b0ca9b601e45d78d6f3c85772e3bd945ab5a4e8e authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #624 from astrofrog/fix-warning-python3.3

Fix logger 'warn' to 'warning' since 'warn' was deprecated in Python 3.3

5f7291242acd76f83422d490eed3846080fbd793 authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #458 from eteq/test-imports-2

added test_imports to make sure all packages successfully import

6350915eb343f133b303729c567c96f22e0e00ec authored almost 12 years ago by Erik Bray <[email protected]>
Added LICENSE line to files that were missing it

b6c9b3f59b734be0acc20d3bbdfd082be8136c4d authored almost 12 years ago by Thomas Robitaille <[email protected]>
Fix logger 'warn' to 'warning' since 'warn' was deprecated in Python 3.3

51d5ff481bcd65dafa3583fb2ca7a149a7d4604a authored almost 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #505 from astrofrog/move-testing-to-temp

Run tests from temporary directory

68afb7873427cf48c128d47487ba96b16a837ec9 authored about 12 years ago by Thomas Robitaille <[email protected]>
Add a comment in the source code explaining the fix for #537.

0994c587386b59c76267f5e1d99a8d0cb6847a0a authored about 12 years ago by Erik M. Bray <[email protected]>
Fixes an annoying warning that can come from pkg_resources when running

astropy.test():

```
>>>> astropy.test()
> ^[[0;33mWARNING^[[0m: Module _pytest was already impor...

c84e50a65a8be7fe2c99105be8b1ee3edc5d50f6 authored about 12 years ago by Erik M. Bray <[email protected]>
Added prefix for mkdtemp

3356021d90ae1e8337e87899303c67089e920fe6 authored about 12 years ago by Thomas Robitaille <[email protected]>
Use try…finally block in test command

3d5eec7616c362e3062472d03dc0c9ecc6a3562e authored about 12 years ago by Thomas Robitaille <[email protected]>
Run tests from temporary directory

f493c130b7dfa30c0fb67736b8de22c9a7d561e5 authored about 12 years ago by Thomas Robitaille <[email protected]>
Merge pull request #457 from jiffyclub/fix-pytest-imports

Correct pytest imports from "import pytest" to "from ...tests.helper import pytest"

b0b238466012006dae6854b240fa7fa8bc6f4739 authored about 12 years ago by Erik Tollerud <[email protected]>
Fixing relative imports in test files. These are mostly imports of pytest, but I fixed a couple others I noticed.

ffc8d76e057472d98ba7e6183cb8bad1e05a35a9 authored about 12 years ago by Matt <[email protected]>
If _pytest is already in sys.modules by the time we import this module, it's likely that we're already running the py.test command, and so we should use the already imported system pytest.

5ffda185d010447a7c16ba98885abaebd5b4efbb authored about 12 years ago by Erik M. Bray <[email protected]>
Merge pull request #425 from astrofrog/io/ascii-compressed

Added support for compressed files in astropy.io.ascii

968de56eca7b1950b0c343bebe5a3ec64d425adf authored about 12 years ago by Thomas Robitaille <[email protected]>