Skip to content
This repository has been archived by the owner on Mar 7, 2018. It is now read-only.

Tox file for testing #107

Merged
merged 2 commits into from
Dec 17, 2016
Merged

Tox file for testing #107

merged 2 commits into from
Dec 17, 2016

Conversation

ogenstad
Copy link
Contributor

@ogenstad ogenstad commented Dec 8, 2016

Adding tox.ini file as an example for the discussion.

@coveralls
Copy link

coveralls commented Dec 8, 2016

Coverage Status

Coverage remained the same at 79.901% when pulling 64a1237 on ogenstad:tox into 36e24de on napalm-automation:develop.


commands=
py.test --cov-report= --cov=napalm_eos test/
pylama napalm_eos test
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't just be pylama .?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, please, put pylama . back and add this to setup.cfg in the pylama section; skip = .tox/*. That should do.

@dbarrosop
Copy link
Member

I like it, not sure if we need something more here, do you know if this is gonna have some impact on coveralls.

Anyway, we can probably test. If you do the changes I mentioned in the code, add .tox to gitignore if it's not there already, and update .travis.yml we can see how it behaves.

Btw, what's the implication on travis? Now we tell travis it has to run on different python version, do we have to just leave one and let travis handle it?

@dbarrosop
Copy link
Member

Googling it seems the correct way is using; tox-travis. Do you mind playing with it? : )

@ogenstad
Copy link
Contributor Author

I think the use of tox-travis is mostly to show the correct Python versions on Travis instead of showing the tox environment version of Python. Compare this to this, might be other things that I'm not aware of. Anyway I used tox-travis for this.

I also changed setup.cfg to have pytest call pylama instead of running pylama. The reason for this is that the tests will fail as soon after the first command has a non normal exit. So pylama will never run if the other tests are failing. This way linting errors will be shown along with the results from pytest.

@coveralls
Copy link

coveralls commented Dec 15, 2016

Coverage Status

Coverage decreased (-0.2%) to 79.74% when pulling cc5b9e8 on ogenstad:tox into 36e24de on napalm-automation:develop.

@dbarrosop
Copy link
Member

Works for me, let's see what the rest thinks.

@mirceaulinic
Copy link
Member

Same here.

@dbarrosop
Copy link
Member

I am merging this one and creating issues to do this on all the repos.

Thanks!

@dbarrosop dbarrosop merged commit e0c13dc into napalm-automation:develop Dec 17, 2016
@dbarrosop dbarrosop mentioned this pull request Dec 17, 2016
Closed
dbarrosop pushed a commit that referenced this pull request Dec 29, 2016
* Rename mock files for napalm-base 0.19.0

* Require napalm-base>=0.19.0

* Mock for get_ntp_servers

* Implement get_network_instances() (#89)

* Add .get_vrfs() method

* Update get_vrfs to get_network_instances

* Use get_interfaces_ip instead of get_interfaces

* Update descriptor to distinguisher

* Test get_network_instances()

* Clean up name filter section

* Add Python3 support to napalm-eos (#91)

* Python3 support

* Fixing py3 import issue

* Fixing iteritems for py3

* Fixing issue where order of dictionary keys was required for unit tests to pass.

* Python3 support

* Fixing py3 import issue

* Fixing iteritems for py3

* Fixing issue where order of dictionary keys was required for unit tests to pass.

* Fixing new unicode references

* Test preparation items

* Update travis to include python3

* Add `is_alive` (#92)

* Add

* Add mock data for is_alive haha

* Fixes various get_bgp_neighbors

* The use of a for loop instead of while caused random data loss
  ( the actual cause of issue #58)
* Peers that where idle would always have enable=False
* Uptime was actually the timestamp of when the session started

* Fix #90 (#94)

* Fix #90

* Add show version output for test_get_environment cases

* Add testcase for #90

* Remove the _get_version helper

* Version bump to 0.5.0 (#95)

* Version bump to 0.5.0

And add myself to authors

* Trigger doc build on success

* Merging develop into master for the mock files migration (#87) (#96)

* Rename mock files for napalm-base 0.19.0

* Require napalm-base>=0.19.0

* Mock for get_ntp_servers

* Implement get_network_instances() (#89)

* Add .get_vrfs() method

* Update get_vrfs to get_network_instances

* Use get_interfaces_ip instead of get_interfaces

* Update descriptor to distinguisher

* Test get_network_instances()

* Clean up name filter section

* Add Python3 support to napalm-eos (#91)

* Python3 support

* Fixing py3 import issue

* Fixing iteritems for py3

* Fixing issue where order of dictionary keys was required for unit tests to pass.

* Python3 support

* Fixing py3 import issue

* Fixing iteritems for py3

* Fixing issue where order of dictionary keys was required for unit tests to pass.

* Fixing new unicode references

* Test preparation items

* Update travis to include python3

* Add `is_alive` (#92)

* Add

* Add mock data for is_alive haha

* Fixes various get_bgp_neighbors

* The use of a for loop instead of while caused random data loss
  ( the actual cause of issue #58)
* Peers that where idle would always have enable=False
* Uptime was actually the timestamp of when the session started

* Fix #90 (#94)

* Fix #90

* Add show version output for test_get_environment cases

* Add testcase for #90

* Remove the _get_version helper

* Version bump to 0.5.0 (#95)

* Version bump to 0.5.0

And add myself to authors

* Trigger doc build on success

* Fix 98

* Rename file to fix test

* Dbarrosop/fix signatures (#100)

* Fix method signatures

* Use defaults from constants

* Fix case

* Default preference to empty string

* Preference default to 0

* Rename NTP templates

* Fix variable names

* Fix traceoute signature

* New mock

* Version bump to 0.5.1

* SNMP template

* bugfixes (#105)

1. currentTemperature key is not present when key hwStatus == unknownHwStatus
2. pattern in memory regex has additional space

* Tox file for testing (#107)

* Tox file for testing

* Changes for travis

* Raise TypeError instead of returning string

* Protocol check updates
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants