Skip to content

Commit

Permalink
chore(deps-dev): bump pytest from 8.1.1 to 8.2.0 in /requirements (#7016
Browse files Browse the repository at this point in the history
)

* chore(deps-dev): bump pytest from 8.1.1 to 8.2.0 in /requirements

Bumps [pytest](https://github.com/pytest-dev/pytest) from 8.1.1 to 8.2.0.
- [Release notes](https://github.com/pytest-dev/pytest/releases)
- [Changelog](https://github.com/pytest-dev/pytest/blob/main/CHANGELOG.rst)
- [Commits](pytest-dev/pytest@8.1.1...8.2.0)

---
updated-dependencies:
- dependency-name: pytest
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* apply workaround for pytest8.2.0 to work

* update for typing

* Update requirements/dev.txt

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Wing Fung Lau <4760060+hawflau@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and hawflau committed May 14, 2024
1 parent e6e698b commit 9ef0573
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
3 changes: 1 addition & 2 deletions requirements/dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ types-urllib3==1.26.25.14

# Test requirements

# Bumping pytest to >= 8.2.0 results in E2E test no starting up on python3.8
pytest==8.1.1
pytest==8.2.0

parameterized==0.9.0
pytest-xdist==3.6.1
Expand Down
10 changes: 6 additions & 4 deletions tests/end_to_end/test_runtimes_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,15 +28,17 @@
class InitValidator(BaseValidator):
def validate(self, command_result: CommandResult):
self.assertEqual(command_result.process.returncode, 0)
self.assertTrue(Path(self.test_context.working_directory).is_dir())
self.assertTrue(Path(self.test_context.project_directory).is_dir())
if self.test_context is not None:
self.assertTrue(Path(self.test_context.working_directory).is_dir())
self.assertTrue(Path(self.test_context.project_directory).is_dir())


class BuildValidator(BaseValidator):
def validate(self, command_result: CommandResult):
self.assertEqual(command_result.process.returncode, 0)
build_dir = Path(self.test_context.project_directory) / ".aws-sam"
self.assertTrue(build_dir.is_dir())
if self.test_context is not None:
build_dir = Path(self.test_context.project_directory) / ".aws-sam"
self.assertTrue(build_dir.is_dir())


class LocalInvokeValidator(BaseValidator):
Expand Down
5 changes: 3 additions & 2 deletions tests/end_to_end/test_stages.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,16 @@


class BaseValidator(TestCase):
def __init__(self, test_context: EndToEndTestContext):
# NOTE: making test_context optional as a workaround for pytest 8.2.0 to collect tests - https://github.com/pytest-dev/pytest/pull/12320/files
def __init__(self, test_context: Optional[EndToEndTestContext] = None):
super().__init__()
self.test_context = test_context

def validate(self, command_result: CommandResult):
self.assertEqual(command_result.process.returncode, 0)


class EndToEndBaseStage(TestCase):
class EndToEndBaseStage:
def __init__(
self, validator: BaseValidator, test_context: EndToEndTestContext, command_list: Optional[List[str]] = None
):
Expand Down

0 comments on commit 9ef0573

Please sign in to comment.