Skip to content

Commit

Permalink
feat: Add unit test for pytest command in sweep.ya
Browse files Browse the repository at this point in the history
  • Loading branch information
sweep-ai[bot] authored Dec 30, 2023
1 parent 61a0e5d commit 9f6df10
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions backend/tests/test_sweep.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import subprocess
import unittest


class TestSweep(unittest.TestCase):
def test_pytest_command(self):
result = subprocess.run(["pytest"], stdout=subprocess.PIPE, stderr=subprocess.PIPE)

self.assertEqual(result.returncode, 0)
self.assertIn("collected", result.stdout.decode())
self.assertIn("passed", result.stdout.decode())
self.assertNotIn("ERROR", result.stdout.decode())
self.assertNotIn("FAILED", result.stdout.decode())


if __name__ == "__main__":
unittest.main()

0 comments on commit 9f6df10

Please sign in to comment.