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

running pytest test_nbmdt.py gives attribute errors in TestIPv4Route #34

Open
jeffsilverm opened this issue Feb 25, 2019 · 2 comments
Open

Comments

@jeffsilverm
Copy link
Owner

When I give the command
pytest pytest --color=yes test_nbmdt.py | less -r

I get 4 attribute errors, all involving `no attribute 'route_test':

E AttributeError: 'TestIPv4Route' object has no attribute 'route_list'

(general) jeffs@Jeffs-Win-10-laptop:~/ubuntu/python/nbmdt$ fgrep IPv4_route *.py */*.py network.py: """This method produces a nice string representation of a IPv4_route object""" network.py: """This method produces a nice string representation of a IPv4_route object""" routes.py: route_list.append(self.IPv4_route(name=name, routes.py: """This method produces a nice string representation of a IPv4_route object""" test_nbmdt.py: self.route_list = nbmdt.IPv4_route.find_ipv4_routes() test_nbmdt.py: self.assertIsInstance(r, nbmdt.IPv4_route ) utilities.py: # ipv4_routes = IPv4_route.find_ipv4_routes() (general) jeffs@Jeffs-Win-10-laptop:~/ubuntu/python/nbmdt$

One thing I notice is that there are two files that do the same thing: network.py and route.py. There should be one file, network.py, because that is the name of the level. It does routing, to be sure.

@jeffsilverm
Copy link
Owner Author

networks.py should never have existed.
git rm networks.py

@jeffsilverm
Copy link
Owner Author

File class IPv4_address show inherit from the standard library class ipaddress and class Layer in file layer.py

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

1 participant