You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Black 20.b0 was released today and introduces changes that break the tox tests.
STEPS TO REPRODUCE
Execute tox.
EXPECTED RESULTS
Running tox on the master branch should pass.
ACTUAL RESULTS
The output of black ./ --check --diff command shows that it wants to re-format two files
development_scripts.py
tests/test_testcases_exists.py
tests/test_testcases_exists.py
--- tests/test_testcases_exists.py 2020-08-27 13:02:17.883910 +0000+++ tests/test_testcases_exists.py 2020-08-27 13:02:51.506288 +0000@@ -9,12 +9,11 @@
TEST_DIRECTORIES = os.listdir("tests")
def extract_index_data():
- """Used to parametrize and report each test case with the necessary data.- """+ """Used to parametrize and report each test case with the necessary data."""
index = sorted(load_index_data())
mock_directories = []
for row in index:
# Trim template name to only parts making up platform and command directories
template = row[0].strip()
@@ -34,10 +33,9 @@
return mock_directories
@pytest.mark.parametrize("mock_directory", extract_index_data())
def test_verify_parsed_and_reference_data_exists(mock_directory):
- """Verify that at least one test exists for all entries in the index file.- """+ """Verify that at least one test exists for all entries in the index file."""
cases = f"{mock_directory}/*.raw"
test_list = glob.glob(cases)
assert len(test_list) != 0, f"Could not find tests for {mock_directory}.textfsm"
development_scripts.py
--- development_scripts.py 2020-08-27 13:02:17.883910 +0000+++ development_scripts.py 2020-08-27 13:02:51.758646 +0000@@ -287,11 +287,11 @@
None: File I/O is performed to ensure YAML file adheres to yamllint config.
Example:
>>> filepath = "tests/cisco_ios/show_version/cisco_ios_show_version.yml"
>>> transform_parsed(filepath)
- >>> + >>>
"""
with open(filepath, encoding="utf-8") as parsed_file:
parsed_object = YAML_OBJECT.load(parsed_file)
ensure_yaml_standards(parsed_object, filepath)
@@ -313,11 +313,11 @@
Example:
>>> dirpath = "tests/*/*"
>>> transform_parsed(dirpath)
# Each filename is printed to the terminal
- >>> + >>>
"""
# This commented out code was used for mass renaming of files;
# it is probably not needed anymore
# for file in glob.iglob("{0}/*.parsed".format(dirpath)):
# os.rename(file, file.replace(file[-6:], "yml"))
@@ -373,11 +373,11 @@
cisco_ios
>>> print(command)
show version
>>> print(filename)
cisco_ios_show_version
- >>> + >>>
"""
command_dir, filename = os.path.split(filepath)
platform_dir, command = os.path.split(command_dir)
test_dir, platform = os.path.split(platform_dir)
@@ -410,11 +410,11 @@
['cisco_ios_show_version.raw']
>>> filepath = "tests/cisco_ios/show_version/cisco_ios_show_version.raw"
>>> build_parsed_data_from_output(filepath)
>>> os.listdir(root_dir)
['cisco_ios_show_version.raw', 'cisco_ios_show_version.yml']
- >>> + >>>
"""
platform, command, filename = parse_test_filepath(filepath)
with open(filepath, encoding="utf-8") as output_file:
output_data = output_file.read()
@@ -443,11 +443,11 @@
Example:
>>> dirpath = "tests/cisco_ios/show_mac-address-table"
>>> build_parsed_data_from_dir(dirpath)
# Each filename is printed to the terminal
- >>> + >>>
"""
for file in glob.iglob("{0}/*.raw".format(dirpath)):
print(file)
build_parsed_data_from_output(file, test_dir)
The text was updated successfully, but these errors were encountered:
ISSUE TYPE
SUMMARY
Black 20.b0 was released today and introduces changes that break the
tox
tests.STEPS TO REPRODUCE
Execute
tox
.EXPECTED RESULTS
Running
tox
on the master branch should pass.ACTUAL RESULTS
The output of
black ./ --check --diff
command shows that it wants to re-format two filestests/test_testcases_exists.py
development_scripts.py
The text was updated successfully, but these errors were encountered: