Giter Site home page Giter Site logo

aiida_pytest's People

Contributors

danielmarchand avatar greschd avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

aiida_pytest's Issues

`configure` tries to assert that no configuration exists in config folder

It seems the part of the code that backs up the configuration fails, if any configuration already exists. This is probably not intended, since it results in backing up only inexistent configurations.

@contextmanager
    def reset_after_run():
    ...
    assert not os.path.isfile(os.path.join(config_folder, 'config.json'))

The following error is generated from the contributed aiida-vasp tests:

_________________________________________________________________________________________________________________________ ERROR at setup of test_vasp __________________________________________________________________________________________________________________________

pytestconfig = <_pytest.config.Config object at 0x10a7a2250>
config_dict = {'codes': [{'default_plugin': 'vasp.vasp', 'description': 'VASP', 'label': 'vasp', 'prepend_text': 'source /users/gres...: '/home/greschd/software/VASP-5.4.1/potpaw_PBE.54', 'group_description': 'VASP 5.4 potpaw_PBE', 'group_name': 'pbe'}]}

    @pytest.fixture(scope='session')
    def configure(pytestconfig, config_dict):
        config = copy.deepcopy(config_dict)
        with temporary.temp_dir() as td, PGTest(max_connections=100) as pgt:
>           with reset_after_run():

../../aiida_pytest/aiida_pytest/configure.py:52:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/contextlib.py:17: in __enter__
    return self.gen.next()
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

    @contextmanager
    def reset_after_run():
        config_folder = os.path.expanduser(aiida.common.setup.AIIDA_CONFIG_FOLDER)
        config_save_folder = os.path.join(
            os.path.dirname(config_folder), '.aiida~'
        )
        reset_config(config_folder, config_save_folder)
>       assert not os.path.isfile(os.path.join(config_folder, 'config.json'))
E       AssertionError

../../aiida_pytest/aiida_pytest/configure.py:101: AssertionError

bad wildcard import

from aiida_pytest import * imports unwanted objects and even reimports builtins.

There should probably be a top level __all__.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.