# Copyright (c) 2011, Lawrence Livermore National Security, LLC. Produced at 
# the Lawrence Livermore National Laboratory. Written by David A. Brown 
# <brown170@llnl.gov>. 
# 
# LLNL-CODE-484151 All rights reserved.  
# 
# This file is part of EXFOR Interface (x4i)  
#
# Please also read the LICENSE.txt file included in this distribution, under 
# "Our Notice and GNU General Public License".  
#
# This program is free software; you can redistribute it and/or modify it 
# under the terms of the GNU General Public License (as published by the 
# Free Software Foundation) version 2, dated June 1991.  
#
# This program is distributed in the hope that it will be useful, but WITHOUT 
# ANY WARRANTY; without even the IMPLIED WARRANTY OF 
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
# terms and conditions of the GNU General Public License for more details.  
#
# You should have received a copy of the GNU General Public License 
# along with this program; if not, write to the Free Software Foundation, 
# Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA  

import os
import tarfile

this_path = os.path.abspath(os.path.dirname(__file__))

if not os.path.exists(os.path.join(this_path, 'data')):
    with tarfile.open(os.path.join(this_path, 'test_data.tar.gz'), "r:gz") as tf:
        tf.extractall()
