Skip to content

Commit

Permalink
test env creation in global location
Browse files Browse the repository at this point in the history
  • Loading branch information
xvik committed Apr 5, 2024
1 parent 11fcd8e commit 20e6ef2
Showing 1 changed file with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
package ru.vyarus.gradle.plugin.python

import org.gradle.testkit.runner.BuildResult
import org.gradle.testkit.runner.TaskOutcome
import spock.lang.TempDir

/**
* @author Vyacheslav Rusakov
* @since 05.04.2024
*/
class GlobalEnvironmentKitTest extends AbstractKitTest {

@TempDir File envDir

def "Check module override"() {
setup:
build """
plugins {
id 'ru.vyarus.use-python'
}
python {
envPath = "${envDir.absolutePath.replace('\\\\', '\\\\\\\\')}"
pip 'extract-msg:0.28.1', 'extract-msg:0.28.0'
}
"""

when: "run task"
BuildResult result = run('pipInstall')

then: "task successful"
result.task(':pipInstall').outcome == TaskOutcome.SUCCESS
result.output =~ /extract-msg\s+0.28.0/
}
}

0 comments on commit 20e6ef2

Please sign in to comment.