Skip to content

Commit

Permalink
Re-enable pytest-xdist for integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mlesniewski-reef committed Nov 21, 2022
1 parent aa945e4 commit 8f4f431
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
* Ensured that changelog validation only happens on pull requests
* Fix bucket leaks in integration tests
* Allow only one CI workflow at a time
* Re-enable pytest-xdist for integration tests

## [3.6.0] - 2022-09-20

Expand Down
3 changes: 1 addition & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -180,9 +180,8 @@ def integration(session):
"""Run integration tests."""
install_myself(session)
session.run('pip', 'install', *REQUIREMENTS_TEST)
#session.run('pytest', '-s', '-x', '-v', '-n', '4', *session.posargs, 'test/integration')
session.run(
'pytest', '-s', '-x', '-v', '-W', 'ignore::DeprecationWarning:rst2ansi.visitor:',
'pytest', '-s', '-x', '-v', '-n', '4', '-W', 'ignore::DeprecationWarning:rst2ansi.visitor:',
*session.posargs, 'test/integration'
)

Expand Down
8 changes: 5 additions & 3 deletions test/integration/helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,8 @@ def read_from(self, f):
self.string = str(e)


@dataclasses.dataclass
# TODO: add slots=True when dropping support for Python 3.9
@dataclasses.dataclass(frozen=True)
class CommandResult:
status: int
stdout: str
Expand Down Expand Up @@ -362,9 +363,10 @@ def __init__(self, command, account_id, application_key, realm):

def run(self, args, additional_env: Optional[dict] = None) -> CommandResult:
if args:
if args[0] == 'create-bucket':
subcommand = args[0].replace('_', '-')
if subcommand == 'create-bucket':
raise ValueError(f'use {type(self).__name__}.create_bucket instead')
elif args[0] == 'delete-bucket':
elif subcommand == 'delete-bucket':
raise ValueError(f'use {type(self).__name__}.delete_bucket instead')

return run_command(self.command, args, additional_env)
Expand Down

0 comments on commit 8f4f431

Please sign in to comment.