# Path: test/test_data.py
# def getdatafile(parser, subdir, files, stream=None, loglevel=logging.ERROR, datatype=None):
#     """Returns a parsed logfile.
# 
#     Inputs:
#         parser   - a logfile parser class (subclass of LogFile)
#         subdir   - subdirectory containing data files (program version)
#         files    - data filename(s)
#         stream   - where to log to (sys.stdout by default)
#         loglevel - what level to log at
#         datatype - ccData or child class
# 
#     Outputs:
#         data - the resulting data object
#         logfile - the parser object used for parsing
#     """
# 
#     # Convert any string into the parser object we will be using.
#     if isinstance(parser, str):
#         parser = all_parsers[parser]
# 
#     datadir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "data"))
#     programdir = os.path.join(get_program_dir(parser.__name__), subdir)
#     inputs = [os.path.join(datadir, programdir, fn) for fn in files]
# 
#     # We should be able to pass a list of length one here, but for some reason
#     # this does not work with some parsers and we get errors.
#     if len(inputs) == 1:
#         inputs = inputs[0]
# 
#     stream = stream or sys.stdout
#     logfile = parser(inputs, logstream=stream, loglevel=loglevel,
#                      datatype=datatype or cclib.parser.data.ccData)
# 
#     data = logfile.parse()
#     return data, logfile


import unittest
import numpy as np
        import pyscf
from cclib.bridge import cclib2pyscf
from cclib.parser.utils import find_package, convertor
from test.test_data import getdatafile
        from pyscf import dft
# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.






class PyscfTest(unittest.TestCase):

    def setUp(self):
        super(PyscfTest, self).setUp()
        if not find_package("pyscf"):
            raise ImportError("Must install pyscf to run this test")
        self.data, self.logfile = getdatafile(
            "GAMESS", "basicGAMESS-US2018", ["dvb_sp.out"]
        )

# Path: test/test_data.py
# def getdatafile(parser, subdir, files, stream=None, loglevel=logging.ERROR, datatype=None):
#     """Returns a parsed logfile.
# 
#     Inputs:
#         parser   - a logfile parser class (subclass of LogFile)
#         subdir   - subdirectory containing data files (program version)
#         files    - data filename(s)
#         stream   - where to log to (sys.stdout by default)
#         loglevel - what level to log at
#         datatype - ccData or child class
# 
#     Outputs:
#         data - the resulting data object
#         logfile - the parser object used for parsing
#     """
# 
#     # Convert any string into the parser object we will be using.
#     if isinstance(parser, str):
#         parser = all_parsers[parser]
# 
#     datadir = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", "data"))
#     programdir = os.path.join(get_program_dir(parser.__name__), subdir)
#     inputs = [os.path.join(datadir, programdir, fn) for fn in files]
# 
#     # We should be able to pass a list of length one here, but for some reason
#     # this does not work with some parsers and we get errors.
#     if len(inputs) == 1:
#         inputs = inputs[0]
# 
#     stream = stream or sys.stdout
#     logfile = parser(inputs, logstream=stream, loglevel=loglevel,
#                      datatype=datatype or cclib.parser.data.ccData)
# 
#     data = logfile.parse()
#     return data, logfile


# Path: test/bridge/testpyscf.py
import unittest
import numpy as np
        import pyscf
from cclib.bridge import cclib2pyscf
from cclib.parser.utils import find_package, convertor
from test.test_data import getdatafile
        from pyscf import dft

# -*- coding: utf-8 -*-
#
# Copyright (c) 2020, the cclib development team
#
# This file is part of cclib (http://cclib.github.io) and is distributed under
# the terms of the BSD 3-Clause License.






class PyscfTest(unittest.TestCase):

    def setUp(self):
        super(PyscfTest, self).setUp()
        if not find_package("pyscf"):
            raise ImportError("Must install pyscf to run this test")
        self.data, self.logfile = getdatafile(
            "GAMESS", "basicGAMESS-US2018", ["dvb_sp.out"]
        )

        self.udata, self.ulogfile = getdatafile(