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) when running nosetests on root brute-force directory, says 0 tests run.
Comments
Post a Comment