Skip to content

Instantly share code, notes, and snippets.

@rms1000watt
Created January 21, 2019 01:40
Show Gist options
  • Save rms1000watt/29460b91c1fa0d8608c53c100fa3940c to your computer and use it in GitHub Desktop.
Save rms1000watt/29460b91c1fa0d8608c53c100fa3940c to your computer and use it in GitHub Desktop.
Python Unit Tests Output junit
import unittest
class RyanTest(unittest.TestCase):
def test_hello_world(self):
print("hello world")
def test_failure(self):
self.assertEqual(1, 2)
if __name__ == '__main__':
unittest.main()
#!/usr/bin/env bash
coverage run --branch -m pytest --verbose --junitxml=test_results.xml -s test.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment