Skip to content

Commit

Permalink
Adding test compatibility with hatch 1.7.0. Added test for python 3.11
Browse files Browse the repository at this point in the history
  • Loading branch information
Aron S. Tronhjem committed Jun 9, 2023
1 parent 9d92ef1 commit 8a3a919
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
fail-fast: false
matrix:
os: [ubuntu-latest]
python-version: ['3.7', '3.8', '3.9', '3.10']
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v2
Expand Down
31 changes: 28 additions & 3 deletions tests/test_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,15 @@ def test_default(self, isolation, data_dir, platform, default_python_version):
},
)
environment = CondaEnvironment(
isolation, project.metadata, 'default', project.config.envs['default'], {}, data_dir, platform, 0
root=isolation,
metadata=project.metadata,
name='default',
config=project.config.envs['default'],
matrix_variables={},
data_directory=data_dir,
isolated_data_directory=None,
platform=platform,
verbosity=0,
)

assert environment.python_version == default_python_version
Expand All @@ -29,7 +37,15 @@ def test_long(self, isolation, data_dir, platform):
},
)
environment = CondaEnvironment(
isolation, project.metadata, 'default', project.config.envs['default'], {}, data_dir, platform, 0
root=isolation,
metadata=project.metadata,
name='default',
config=project.config.envs['default'],
matrix_variables={},
data_directory=data_dir,
isolated_data_directory=None,
platform=platform,
verbosity=0,
)

assert environment.python_version == '3.10'
Expand All @@ -43,8 +59,17 @@ def test_short(self, isolation, data_dir, platform):
'tool': {'hatch': {'envs': {'default': env_config}}},
},
)

environment = CondaEnvironment(
isolation, project.metadata, 'default', project.config.envs['default'], {}, data_dir, platform, 0
root=isolation,
metadata=project.metadata,
name='default',
config=project.config.envs['default'],
matrix_variables={},
data_directory=data_dir,
isolated_data_directory=None,
platform=platform,
verbosity=0,
)

assert environment.python_version == '3.10'

0 comments on commit 8a3a919

Please sign in to comment.