Skip to content

Commit

Permalink
file and with extension
Browse files Browse the repository at this point in the history
  • Loading branch information
gaborbernat committed Dec 21, 2018
1 parent 6fa31cb commit 823a224
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions tests/test_activation.py
Expand Up @@ -65,6 +65,7 @@ def activation_env(tmp_path_factory):

class Activation(object):
cmd = ""
extension = ""
invoke_script = []
command_separator = os.linesep
activate_cmd = "source"
Expand Down Expand Up @@ -121,7 +122,7 @@ def __call__(self, monkeypatch):
"", # just finish with an empty new line
]
script = self.command_separator.join(commands)
test_script = self.path / "test"
test_script = self.path / ("test{}".format(".{}".format(self.extension) if self.extension else ""))
test_script.write_text(script)

monkeypatch.chdir(str(self.path))
Expand Down Expand Up @@ -190,7 +191,8 @@ def test_fish(activation_env, monkeypatch, tmp_path):

class PowershellActivation(Activation):
cmd = "powershell.exe" if virtualenv.is_win else "pwsh"
invoke_script = [cmd]
extension = "ps1"
invoke_script = [cmd, "-File"]
activate_script = "activate.ps1"
activate_cmd = "."
check = [cmd, "-c", "$PSVersionTable"]
Expand Down

0 comments on commit 823a224

Please sign in to comment.