File tree 3 files changed +11
-10
lines changed 3 files changed +11
-10
lines changed Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ dev = [
25
25
" black==23.11.0" ,
26
26
" codespell==2.2.6" ,
27
27
" refurb==1.24.0" ,
28
- " ruff==0.1.6 " ,
28
+ " ruff==0.3.1 " ,
29
29
" tox==4.11.3" ,
30
30
" types-toml==0.10.8.7" ,
31
31
]
Original file line number Diff line number Diff line change @@ -5,21 +5,21 @@ def test_should_parse_library_config_with_src_directory() -> None:
5
5
config = Config .parse ("fixtures/library_src" )
6
6
assert config .source_directories == ["src" ]
7
7
assert config .test_directory == "tests"
8
- assert config .include_source_dir_in_test_path is False
8
+ assert not config .include_source_dir_in_test_path
9
9
10
10
11
11
def test_should_parse_library_config_with_package_directory () -> None :
12
12
config = Config .parse ("fixtures/library_pkg" )
13
13
assert config .source_directories == ["package" ]
14
14
assert config .test_directory == "tests"
15
- assert config .include_source_dir_in_test_path is True
15
+ assert config .include_source_dir_in_test_path
16
16
17
17
18
18
def test_should_parse_application_config () -> None :
19
19
config = Config .parse ("fixtures/application" )
20
20
assert config .source_directories == ["app" , "lib" ]
21
21
assert config .test_directory == "tests"
22
- assert config .include_source_dir_in_test_path is True
22
+ assert config .include_source_dir_in_test_path
23
23
24
24
25
25
def test_ignore_pattern () -> None :
Original file line number Diff line number Diff line change @@ -16,8 +16,7 @@ def test_execute_source_file_strategy(mock_run: MagicMock) -> None:
16
16
test_directory = autotest .config .test_directory ,
17
17
)
18
18
19
- strategy = SourceFileStrategy (source_file )
20
- result = strategy .execute ()
19
+ result = SourceFileStrategy (source_file ).execute ()
21
20
22
21
assert result
23
22
mock_run .assert_has_calls (
@@ -33,11 +32,13 @@ def test_execute_test_file_strategy(mock_run: MagicMock) -> None:
33
32
mock_run .return_value = 0
34
33
autotest = Autotest ("fixtures/application" )
35
34
36
- path = Path ("fixtures/application/tests/test_module.py" ).absolute ()
37
- path = path .relative_to (autotest .config .path .absolute ())
35
+ path = (
36
+ Path ("fixtures/application/tests/test_module.py" )
37
+ .absolute ()
38
+ .relative_to (autotest .config .path .absolute ())
39
+ )
38
40
39
- strategy = TestFileStrategy (path )
40
- result = strategy .execute ()
41
+ result = TestFileStrategy (path ).execute ()
41
42
42
43
assert result
43
44
mock_run .assert_has_calls (
You can’t perform that action at this time.
0 commit comments