Ecosyste.ms: OpenCollective

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

github.com/astropy/pytest-remotedata

Pytest plugin to control whether tests are run that have remote data
https://github.com/astropy/pytest-remotedata

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]>
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]>
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]>
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]>
Update to alternate implementation that uses lsof

4883f2e288bf5f5457e37bc02d1bb642af0a5db7 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]>
Check that we can successfully run lsof

62c139aa66b0b6c02a0b472be586346e69f49c76 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]>
move creation of test's temporary cache/config directory to a py.test fixture.

Requires py.test > 2.3!

42bb77b94c0c86bbfe20cf8e96953ee962952f1d authored about 12 years ago by Erik Tollerud <[email protected]>
Updated get_data -> get_pkg_data and fixed failing tests

6b80924dbdeed98839913c5fc9724c2648a6a864 authored about 12 years ago by Thomas Robitaille <[email protected]>
added test_imports to make sure all packages successfully import

970fda16a42d913fcd2ea476746d7e258aa0dea2 authored about 12 years ago by Erik Tollerud <[email protected]>
Rename astropy.io.vo to astropy.io.votable

e908e0a5ce6d0a09b7584a55d1ba1e897cca30ec authored about 12 years ago by Michael Droettboom <[email protected]>
Whitespace

7372e2a2efcc29f996022a090c90f8491ffce72c authored about 12 years ago by Thomas Robitaille <[email protected]>
Moved compatibility assert_allclose to astropy.tests.compat to avoid importing Numpy when running egg_info.

5defb31408a15d513908e06ec9be67c0e28dcb2b authored about 12 years ago by Thomas Robitaille <[email protected]>
Fixing for Python 3

46a615fa7c8b4dcb2b1425d22274826d7503bef9 authored over 12 years ago by Michael Droettboom <[email protected]>
Remove redundant import

1419c1b7f5a127107e7e837fbd065be2370575ee authored over 12 years ago by Michael Droettboom <[email protected]>
Provide a version of assert_allclose, since it doesn't exist in Numpy 1.4.

4e73e35e80cd233b96f3c347980cfe4637ccf855 authored over 12 years ago by Michael Droettboom <[email protected]>
Fix the `exception_logging_enabled` tests under IPython

3c52ecdf4d1768c36c31eaaac0a23e14dd47d108 authored over 12 years ago by Michael Droettboom <[email protected]>
typo fix

4695825e9710936152963c077c27c77aec6b2a73 authored over 12 years ago by Erik Tollerud <[email protected]>
typo fix

fee4bfa3a8c527147509379a38c8bab81d38927e authored over 12 years ago by Erik Tollerud <[email protected]>
updated config/cache dir test settings to work even if tests are run via astropy.test()

cf934e23cce5408d0f4aecf5613a5e0ecd17b4ab authored over 12 years ago by Erik Tollerud <[email protected]>
added override for config and cache dirs in test command

9082d8db09b58c169924712ba41b6587f8514bd3 authored over 12 years ago by Erik Tollerud <[email protected]>
moved config.logging_helper to logger and tests

4a0b92093953d7ae2285e02b461d375733f1caaa authored over 12 years ago by Erik Tollerud <[email protected]>
Add conftest.py to list of ignored files for coverage

3f2ac0bdb9ca225c1ce867f8d28b07ec9b3aff0c authored over 12 years ago by Michael Droettboom <[email protected]>
Close the coveragerc tmp file if it happens to be open.

8e7c972657c42c5790fdd8e0670f274ad28979b1 authored over 12 years ago by Michael Droettboom <[email protected]>
Remove spurious line

a10c4d00a6ba96608fdaa9b5d30cb8a850dfa980 authored over 12 years ago by Michael Droettboom <[email protected]>
Remove the use_system_pytest ConfigurationItem, because it was pulling in a bunch of code before coverage testing time.

e085f829e187a2b00eb72a65c0736ee33aa08036 authored over 12 years ago by Michael Droettboom <[email protected]>
Allow for marking blocks of code that are specifically for Python 2.x and 3.x to the coverage system.

193c896f168ae641fb203fe641eec8d5976732cf authored over 12 years ago by Michael Droettboom <[email protected]>
Add some exclude_lines to coveragerc

a183253244693e2c4c927f1c067f4d4c66a036c4 authored over 12 years ago by Michael Droettboom <[email protected]>
Add some more ommissions to coveragerc, at @iguananaut's suggestion.

43402ed5a07d8908641bb2be6ce54c2edbe4e7aa authored over 12 years ago by Michael Droettboom <[email protected]>
Fix the problem where any modules that were imported before py.test was started would not be labeled for coverage. This is done by setting a flag in builtins `_ASTROPY_TEST_` which, when True, tells helper.py not to import anything (such as `astropy.config`) at import time.

56bf2af68a645c2a155414c0577350d7c2ce169d authored over 12 years ago by Michael Droettboom <[email protected]>
Add astropy/utils/compat/* to list of omitted files for coverage testing

fe3b511ac6433bf14b4f90c21123c54e31bb1626 authored over 12 years ago by Michael Droettboom <[email protected]>
Fix how this works. coveragerc is now installed alongside astropy. That is the only reliable way I can think of to get `import astropy; astropy.test(coverage=True)` to work.

When running `python setup.py test --coverage`, the `htmlcov` directory ends up in `build/lib......

5d1ca41844f27baf6607835f933ca7ac3cc42a14 authored over 12 years ago by Michael Droettboom <[email protected]>
Adds a --coverage option to "setup.py test" to generate a test coverage report.

Uses the coveragerc that's now included in the source (based on an e-mail from @iguananaut).

ced3f251c0c943060efd038f15ab08eec7c9c561 authored over 12 years ago by Michael Droettboom <[email protected]>
Move the docstring from tests/helper.py:TestRunner.run_tests to the user-facing function astropy.test().

ae660216d90ed4a245e2ba7543ba0701a116bd0e authored over 12 years ago by Michael Droettboom <[email protected]>
Improve time and memory footprint of `import astropy`. `py.test` no longer is imported every time -- only when the tests are actually run.

bb72a758d34f245d50cacce15d74fea4c0d54692 authored over 12 years ago by Michael Droettboom <[email protected]>
adjusted _in_build and _in_setup to _ASTROPY_SETUP_

8f0be13a325e0ed47e213f39306e86896caa2c52 authored over 12 years ago by Erik Tollerud <[email protected]>
fixes test helper to not import astropy.config if it's invoked from setup.py

9a518937cfa203fc9f847020610057da412464ab authored over 12 years ago by Erik Tollerud <[email protected]>
added -d/--pdb option to test command

821132fb67a9c62496518932360c6d505d5fee3a authored over 12 years ago by Erik Tollerud <[email protected]>
This should fix #147.

The real explanation comes from the Python 3.2 docs for the subprocess module:

"If close_fds is...

9ba1ad77b51ef6ff7380128f17aa5847bc754f7a authored almost 13 years ago by Erik Bray <[email protected]>
Fixes path arguments to the test command on Windows. When pytest.main() is passed the arguments as it string, it runs that string through shlex.split(). However, it does not use the 'posix' argument to shlex--or more specifically it doesn't set it to false for Windows as I did here. That causes Windows paths to be mangled. So we can fix that on our end.

d7ab32fc0528d781ae99c534ca655d3c8f79817e authored almost 13 years ago by Erik Bray <[email protected]>
Even simpler and more bullet-proof solution -- just run build out-of-place. That's all we need.

ee3642ac1e563234b2eada734845b58f61ebb212 authored about 13 years ago by Michael Droettboom <[email protected]>
Test what will be installed, not the source tree.

3500a59d8bb46d45bc5d85edfa273fee7d26aa18 authored about 13 years ago by Michael Droettboom <[email protected]>
Import bundled pytest unless the user has specified otherwise with a config option.

87fb3c88f5efea6dccb65caf407c80f6d6ef7440 authored about 13 years ago by Matt Davis <[email protected]>
Added license and docstring to pytest_plugins.py and removed import of __path__ in __init__.py.

28c1ccf99e9ab7a333289fa013cf028eb856d132 authored about 13 years ago by Matt Davis <[email protected]>
Moved py.test plugins to astropy.tests.pytest_plugins and changed conftest.py to import everything from there.

7e397894604eff1bd01d0eccff39fc0555bafaba authored about 13 years ago by Matt Davis <[email protected]>
Moved setup_test_command to setup_helpers.py and made te

st variables in __init__.py less visible.

9fb31641a2ec3cca82ca06ab36cf09cfd0d3fc01 authored about 13 years ago by Matt Davis <[email protected]>
Modifed tests.helper so that the utilties defined within are generic and the actual package specific setup occurs in astropy.__init__.

491185ef246d36b06ac95ef98742390504914495 authored about 13 years ago by Matt Davis <[email protected]>
Merge pull request #84 from phn/version-info-in-pytest-header

Adds the astropy version and other information to the py.test output
header.

Resolved conflict ...

6a3f8f0c5a24069835c71c92383706147f43b6e9 authored about 13 years ago by Erik Tollerud <[email protected]>
fix in tests/helper.py to reflect remotedata->remote-data

0b1aea5ac6bfccb23a6af88473426147b40ebc9d authored about 13 years ago by Erik Tollerud <[email protected]>
Merge pull request #73 from eteq/config-pkg

Implementation of config package - includes both configuration file and data-access functionality.

909a3414bef5e1aa0e967f6a62585b1c82c50b7f authored about 13 years ago by Erik Tollerud <[email protected]>
Add astropy version and some other info to py.test output.

Infomartion added: version, package being tested, "special"
astropy options used. The last is cu...

78848f25188e94a9f5bb1e441e5a333503e93b37 authored about 13 years ago by Prasanth Nair <[email protected]>
Removed comment about the -p option for plugins in helper.py. The plugins are discovered in conftest.py.

59f5b993adb8147baa42cc0d7b7619ca3fa50875 authored about 13 years ago by Matt Davis <[email protected]>
Changed --remotedata option to --remote-data.

4a69592c8c98119e5aa613e30c4be4b5a4ebc923 authored about 13 years ago by Matt Davis <[email protected]>
Keep actual hook definitions in tests.helper but import them into conftest.py to get the same behavior.

e38eabd17bf95113d0696e42c834e9fde1d1be42 authored about 13 years ago by Matt Davis <[email protected]>