Skip to content

Commit

Permalink
ad definition test
Browse files Browse the repository at this point in the history
  • Loading branch information
CagtayFabry committed May 21, 2024
1 parent d0e86cc commit 20b6071
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions pydeps2env/environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ class Environment:
build_system: dict[str, Requirement] = field(default_factory=dict, init=False)

def __post_init__(self, extra_requirements):
print(self.filename)
# cleanup duplicates etc.
self.extras = set(self.extras)
self.channels = list(dict.fromkeys(self.channels))
Expand Down
6 changes: 5 additions & 1 deletion test/test_environment.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import pytest
from pydeps2env import Environment, create_environment
from pydeps2env import Environment, create_environment, create_from_definition

_inputs = [
"./test/pyproject.toml[test]",
Expand Down Expand Up @@ -55,3 +55,7 @@ def test_multiple_sources():
conda, pip = env._get_dependencies()
assert "pydeps2env@ git+https://github.com/CagtayFabry/pydeps2env.git" in pip
assert "testproject@ file:/..//test_package" in pip


def test_definition():
create_from_definition("./test/definition.yaml")

0 comments on commit 20b6071

Please sign in to comment.