Skip to content

Commit

Permalink
switch to prefix_path
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-janssen committed Jan 20, 2024
1 parent 9a3b5b8 commit f0f427d
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions tests/test_conda_subprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,22 +5,22 @@

class TestCondaSubprocess(TestCase):
def test_call(self):
self.assertEqual(call("python --version", prefix_name="py312"), 0)
self.assertEqual(call("python --version", prefix_path="../py312"), 0)

def test_check_call(self):
self.assertEqual(check_call("python --version", prefix_name="py312"), 0)
self.assertEqual(check_call("python --version", prefix_path="../py312"), 0)

def test_check_output(self):
self.assertEqual(check_output("python --version", prefix_name="py312"), b'Python 3.12.1\n')
self.assertEqual(check_output("python --version", prefix_path="../py312"), b'Python 3.12.1\n')

def test_check_output_universal_newlines(self):
self.assertEqual(check_output("python --version", prefix_name="py312", universal_newlines=True), 'Python 3.12.1\n')
self.assertEqual(check_output("python --version", prefix_path="../py312", universal_newlines=True), 'Python 3.12.1\n')

def test_run(self):
self.assertEqual(run("python --version", prefix_name="py312").returncode, 0)
self.assertEqual(run("python --version", prefix_path="../py312").returncode, 0)

def test_popen(self):
process = Popen("python --version", prefix_name="py312", stdout=PIPE)
process = Popen("python --version", prefix_path="../py312", stdout=PIPE)
output = process.communicate()
self.assertEqual(output[0], b'Python 3.12.1\n')
self.assertIsNone(output[1])

0 comments on commit f0f427d

Please sign in to comment.