python - Right directory structure for testing -


i'm new python testing , want set structure similar 1 can have when testing ruby rspec. followed this blog, it's not working me. current structure is:

/brute-force     /source         __init__.py         graph.py     /tests         __init__.py         test_graph.py 

tests/__init__.py:

def setup():     node1 = node(1)     node2 = node(2)     graph = digraph()     graph.add_node(node1)     graph.add_node(node2)     edge = edge(node1, node2)     graph.add_connection(edge) 

tests/test_graph.py

from source import graph.py nose.tools import * expects import *   class testdigraph(object):     def test_array_is_empty(self):         expect([]).to(be_empty) 

files on github

when running nosetests on root brute-force directory, says 0 tests run.


Comments

Popular posts from this blog

node.js - Using Node without global install -

How to access a php class file from PHPFox framework into javascript code written in simple HTML file? -

java - Null response to php query in android, even though php works properly -