Skip to content

Commit 51cc276

Browse files
committed
Adding reg test for quantity cache issue
1 parent 431a32f commit 51cc276

File tree

1 file changed

+26
-0
lines changed

1 file changed

+26
-0
lines changed
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Licensed under a 3-clause BSD style license - see LICENSE.rst
2+
3+
import pytest
4+
import shutil
5+
import tempfile
6+
7+
from astroquery.mpc import MPC
8+
9+
@pytest.mark.remote_data
10+
class TestRandomThings:
11+
12+
@pytest.fixture()
13+
def temp_dir(self, request):
14+
my_temp_dir = tempfile.mkdtemp()
15+
16+
def fin():
17+
shutil.rmtree(my_temp_dir)
18+
request.addfinalizer(fin)
19+
return my_temp_dir
20+
21+
def test_quantity_hooks_cache(self, temp_dir):
22+
# Regression test for #2294
23+
mpc = MPC()
24+
mpc.cache_location = temp_dir
25+
mpc.get_observations(12893, cache=True)
26+
mpc.get_observations(12894, cache=True)

0 commit comments

Comments
 (0)