astropy / pytest-remotedata

Pytest plugin to control whether tests are run that have remote data
BSD 3-Clause "New" or "Revised" License
23 stars 15 forks source link

Using LooseVersion to be compatible with pytest versioning #40

Closed bsipocz closed 5 years ago

bsipocz commented 5 years ago

This is to fix #39

This can/should be backported to the 0.3.x branch in case we plan to have another release from there.

bsipocz commented 5 years ago

I'm not sure I understand how the numpy 3.5 windows build starts to require python2.7 packages 😥

bsipocz commented 5 years ago

@astrofrog - FYI: I had to restart the travis jobs several times as they are fluky with url timeouts, so if we suddenly find ourselves bored and have nothing to do, maybe we can look into making those tests more stable.

dstansby commented 4 years ago

Did this ever make it into a realease? I think we're running into errors like the following with sunpy tests, that would be solved with this PR (I think):

2020-07-13T15:52:03.5347368Z [gw3] linux -- Python 3.8.3 /home/vsts/work/1/s/.tox/py38-conda/bin/python
2020-07-13T15:52:03.5347725Z 
2020-07-13T15:52:03.5347972Z item = <Function test_lfu_cache>
2020-07-13T15:52:03.5348197Z 
2020-07-13T15:52:03.5348515Z     def pytest_runtest_setup(item):
2020-07-13T15:52:03.5348786Z     
2020-07-13T15:52:03.5349168Z >       if StrictVersion(pytest.__version__) < StrictVersion("3.6"):
2020-07-13T15:52:03.5349544Z 
2020-07-13T15:52:03.5350229Z ../../.tox/py38-conda/lib/python3.8/site-packages/pytest_remotedata/plugin.py:65: 
2020-07-13T15:52:03.5350897Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2020-07-13T15:52:03.5351642Z ../../.tox/py38-conda/lib/python3.8/distutils/version.py:40: in __init__
2020-07-13T15:52:03.5352083Z     self.parse(vstring)
2020-07-13T15:52:03.5352562Z _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ 
2020-07-13T15:52:03.5353062Z 
2020-07-13T15:52:03.5353729Z self = <[AttributeError("'StrictVersion' object has no attribute 'version'") raised in repr()] StrictVersion object at 0x7f594c70f0a0>, vstring = '6.0.0rc1'
2020-07-13T15:52:03.5354144Z 
2020-07-13T15:52:03.5354453Z     def parse (self, vstring):
2020-07-13T15:52:03.5354779Z         match = self.version_re.match(vstring)
2020-07-13T15:52:03.5355134Z         if not match:
2020-07-13T15:52:03.5355646Z >           raise ValueError("invalid version number '%s'" % vstring)
2020-07-13T15:52:03.5356264Z E           ValueError: invalid version number '6.0.0rc1'
2020-07-13T15:52:03.5356562Z 
2020-07-13T15:52:03.5357049Z ../../.tox/py38-conda/lib/python3.8/distutils/version.py:137: ValueError
hroncok commented 4 years ago

Did this ever make it into a release?

No. We have the same problem in Fedora.