File tree Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Expand file tree Collapse file tree 1 file changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -383,49 +383,49 @@ def test_prepare_coverage_files(mock_get_run_tmp_file: MagicMock) -> None:
383383
384384def test_has_side_effects () -> None :
385385 source_code = """
386- from requests import Session
386+ from requests import Session
387387
388- s = Session()
389- s.get('https://httpbin.org/get')
388+ s = Session()
389+ s.get('https://httpbin.org/get')
390390
391391 """
392392
393393 result = has_side_effects (source_code )
394394 assert not result .is_successful ()
395395
396396 source_code = """
397- with open('file.txt', 'w') as f:
398- f.write('hi')
397+ with open('file.txt', 'w') as f:
398+ f.write('hi')
399399 """
400400
401401 result = has_side_effects (source_code )
402402
403403 assert result .is_failure () is True
404404
405405 source_code = """
406- from subprocess import Popen
406+ from subprocess import Popen
407407
408- Popen('ls')
408+ Popen('ls')
409409 """
410410
411411 result = has_side_effects (source_code )
412412
413413 assert result .is_failure () is True
414414
415415 source_code = """
416- from pathlib import Path
416+ from pathlib import Path
417417
418- Path('my_file.txt').open('w')
418+ Path('my_file.txt').open('w')
419419 """
420420
421421 result = has_side_effects (source_code )
422422
423423 assert result .is_failure () is True
424424
425425 source_code = """
426- import subprocess
426+ import subprocess
427427
428- subprocess.run('ls')
428+ subprocess.run('ls')
429429 """
430430
431431 result = has_side_effects (source_code )
You can’t perform that action at this time.
0 commit comments