Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tests able to run interactively #23

Open
nsheff opened this issue Oct 10, 2019 · 0 comments
Open

make tests able to run interactively #23

nsheff opened this issue Oct 10, 2019 · 0 comments
Assignees

Comments

@nsheff
Copy link
Member

nsheff commented Oct 10, 2019

I had the tests so that I could run them interactively and test things.

Now I can no longer do that. Can you please replace the way I had it so that I can run them interactively?

Before:

mport pytest
import yacman
import os

# for interactive testing, run from within code/yacman

def test_yaml_load():
    conf = yacman.load_yaml("conf.yaml")
    yacmap = yacman.YacAttMap("conf.yaml")
    yacmap2 = yacman.YacAttMap(conf)

Can run this no problem

After:

 import pytest                                                                                                              

In [4]: import pytest                                                                                                              

In [5]: import yacman                                                                                                              

In [6]: import os                                                                                                                  

In [7]:         yacmap = yacman.YacAttMap(filepath=cfg_file, writable=True)                                                        
---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-7-f12aa010db02> in <module>
----> 1 yacmap = yacman.YacAttMap(filepath=cfg_file, writable=True)

NameError: name 'cfg_file' is not defined

Can no longer easily get a testing environment where I can just load up a yacman for example interactive exploring.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants