Skip to content

Commit

Permalink
use TOMLFile to write toml file
Browse files Browse the repository at this point in the history
  • Loading branch information
dimbleby committed Mar 21, 2023
1 parent 7d913f9 commit b998fc5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tests/console/commands/self/test_remove_plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

import pytest
import tomlkit
from tomlkit.toml_file import TOMLFile

from poetry.core.packages.dependency import Dependency
from poetry.core.packages.package import Package
Expand Down Expand Up @@ -37,7 +38,8 @@ def install_plugin(installed: Repository) -> None:
)
content = Factory.create_pyproject_from_package(package)
system_pyproject_file = SelfCommand.get_default_system_pyproject_file()
system_pyproject_file.write_text(content.as_string(), encoding="utf-8")
toml_file = TOMLFile(system_pyproject_file)
toml_file.write(content)

lock_content = {
"package": [
Expand Down

0 comments on commit b998fc5

Please sign in to comment.