The new command integrates better with ST build systems, which rely on variables such as $file_name.
{
"target": "unit_testing",
"package": "$package_name",
"pattern": "$file_name",
"coverage": false
// all known settings from unittesting.json are valid within build systems.
}
It also significantly reduces required commands to forward tests to python 3.3 and does so as early as possible, reducing redundant function and API calls.
A BaseUnittestingCommand window command handles shared functionality across unit tests, syntax tests and color scheme tests. A WindowCommand is chosen, to replace sublime.active_window() API calls across methods by self.window, to prevent unwanted side effects as unit tests may create and focus new windows at any time.
The JsonFile is replaced by more use-case specific implementations as it is only used to load unittesting.json or schedule.json, which both have some unique requirements.
Main functionality or test run implementation is however unchanged.
This commit mainly intents to provide a single
unit_testing
command, which adapts its behavior based on passed arguments."package"
learned to resolve$package_name
to active view's package."pattern"
learned to resolve$file_name
to active view's filename.As a result the following obsolete commands are replaced:
unit_testing_current_package => unit_testing(package="$package_name", coverage=False)
unit_testing_current_package_coverage => unit_testing(package="$package_name", coverage=True)
unit_testing_current_file => unit_testing(package="$package_name", pattern="$file_name", coverage=False)
unit_testing_current_file_coverage => unit_testing(package="$package_name", pattern="$file_name", coverage=True)
The new command integrates better with ST build systems, which rely on variables such as
$file_name
.It also significantly reduces required commands to forward tests to python 3.3 and does so as early as possible, reducing redundant function and API calls.
A
BaseUnittestingCommand
window command handles shared functionality across unit tests, syntax tests and color scheme tests. A WindowCommand is chosen, to replacesublime.active_window()
API calls across methods byself.window
, to prevent unwanted side effects as unit tests may create and focus new windows at any time.The
JsonFile
is replaced by more use-case specific implementations as it is only used to load unittesting.json or schedule.json, which both have some unique requirements.Main functionality or test run implementation is however unchanged.