Skip to content

Commit

Permalink
Bump readmeai -> v0.5.78.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Mar 4, 2024
1 parent 602a3a0 commit 4e020a8
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 16 deletions.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "readmeai"
version = "0.5.077"
version = "0.5.078"
description = "馃懢 Automated README file generator, powered by large language model APIs."
authors = ["Eli <egsalamie@gmail.com>"]
license = "MIT"
Expand Down
29 changes: 14 additions & 15 deletions tests/parsers/language/test_rust.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
"""Unit tests for Rust-based dependency parsers."""

import sys
"""
Tests for parsing cargo.toml Rust files.
"""

from readmeai.parsers.language.rust import CargoTomlParser

if sys.version_info < (3, 11):
import toml
else:
import tomllib as toml

content = """
[package]
name = "lightning-invoice"
Expand Down Expand Up @@ -58,19 +53,23 @@ def test_cargo_toml_parser():

def test_cargo_toml_parser_missing_section():
parser = CargoTomlParser()
content = toml.dumps({"dependencies": {"packageA": "1.0.0"}})
content = """
[dependencies]
packageA = "1.0.0"
"""
result = parser.parse(content)
assert set(result) == {"packageA"}


def test_cargo_toml_parser_extended_dependency_tables():
parser = CargoTomlParser()
content = toml.dumps(
{
"dependencies": {"packageA": "1.0.0"},
"dependencies.some_feature": {"packageC": "3.0.0"},
}
)
content = """
[dependencies]
packageA = "1.0.0"
[dev-dependencies]
packageC = "3.0.0"
"""
result = parser.parse(content)
assert set(result) == {"packageA", "packageC"}

Expand Down

0 comments on commit 4e020a8

Please sign in to comment.