-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #14 from qamania/master
Fixed sync issues with parallel runs
- Loading branch information
Showing
9 changed files
with
93 additions
and
143 deletions.
There are no files selected for viewing
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
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
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
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
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
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
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 |
---|---|---|
@@ -1,17 +1,16 @@ | ||
import os | ||
from typing import Literal | ||
from pytest import Config | ||
|
||
|
||
def validate_env_variables(config: Config): | ||
if config.getoption('testomatio') and config.getoption('testomatio').lower() in ('sync', 'report', 'remove'): | ||
def validate_option(config: Config) -> Literal['sync', 'report', 'remove', 'debug', None]: | ||
option = config.getoption('testomatio') | ||
option = option.lower() if option else None | ||
if option in ('sync', 'report', 'remove'): | ||
if os.getenv('TESTOMATIO') is None: | ||
raise ValueError('TESTOMATIO env variable is not set') | ||
|
||
# if os.getenv('TESTOMATIO_SHARED_RUN') and not os.getenv('TESTOMATIO_TITLE'): | ||
# raise ValueError('TESTOMATIO_SHARED_RUN can only be used together with TESTOMATIO_TITLE') | ||
if config.getoption('numprocesses') and option in ('sync', 'debug', 'remove'): | ||
raise ValueError('Testomatio does not support parallel sync, remove or report. Remove --numprocesses option') | ||
|
||
|
||
def validate_command_line_args(config: Config): | ||
if config.getoption('numprocesses'): | ||
if config.getoption('testomatio') and config.getoption('testomatio').lower() in ('sync', 'debug', 'remove'): | ||
raise ValueError('Testomatio does not support parallel sync, remove or debug. Remove --numprocesses option') | ||
return option |
This file was deleted.
Oops, something went wrong.
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