-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test env creation in global location
- Loading branch information
Showing
1 changed file
with
36 additions
and
0 deletions.
There are no files selected for viewing
36 changes: 36 additions & 0 deletions
36
src/test/groovy/ru/vyarus/gradle/plugin/python/GlobalEnvironmentKitTest.groovy
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/ | ||
} | ||
} |