Run black on entire project

This commit is contained in:
Sumner Evans
2020-04-23 20:17:45 -06:00
parent e5b3e659ff
commit 0ed2c266d8
52 changed files with 2603 additions and 2917 deletions

View File

@@ -4,38 +4,32 @@ from pathlib import Path
import yaml
from sublime.config import (
AppConfiguration, ReplayGainType, ServerConfiguration)
from sublime.config import AppConfiguration, ReplayGainType, ServerConfiguration
def test_config_default_cache_location():
config = AppConfiguration()
assert config.cache_location == os.path.expanduser(
'~/.local/share/sublime-music')
assert config.cache_location == os.path.expanduser("~/.local/share/sublime-music")
def test_server_property():
config = AppConfiguration()
server = ServerConfiguration(
name='foo', server_address='bar', username='baz')
server = ServerConfiguration(name="foo", server_address="bar", username="baz")
config.servers.append(server)
assert config.server is None
config.current_server_index = 0
assert asdict(config.server) == asdict(server)
expected_state_file_location = Path('~/.local/share').expanduser()
expected_state_file_location = Path("~/.local/share").expanduser()
expected_state_file_location = expected_state_file_location.joinpath(
'sublime-music',
'6df23dc03f9b54cc38a0fc1483df6e21',
'state.pickle',
"sublime-music", "6df23dc03f9b54cc38a0fc1483df6e21", "state.pickle",
)
assert config.state_file_location == expected_state_file_location
def test_yaml_load_unload():
config = AppConfiguration()
server = ServerConfiguration(
name='foo', server_address='bar', username='baz')
server = ServerConfiguration(name="foo", server_address="bar", username="baz")
config.servers.append(server)
config.current_server_index = 0
@@ -54,9 +48,7 @@ def test_yaml_load_unload():
def test_config_migrate():
config = AppConfiguration()
server = ServerConfiguration(
name='Test',
server_address='https://test.host',
username='test',
name="Test", server_address="https://test.host", username="test"
)
config.servers.append(server)
config.migrate()