Skip to content

Commit

Permalink
Update tests
Browse files Browse the repository at this point in the history
See #1
  • Loading branch information
Xander Harris committed Feb 3, 2023
1 parent 17bfd09 commit 619a87e
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@ name = "pypi"

[packages]
sphinx = "*"
faker = "*"

[dev-packages]
jupyter = "*"
pytest = "*"
pytest-cov = "*"
pyyaml = "*"
semver = {ref = "2.13.0", git = "https://github.com/python-semver/python-semver.git"}
wheel = "*"
26 changes: 25 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion sphinxjsondomain.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def generate_examples(self, docname):
"""
Generate example snippets after the document has been processed.
:param str docname: documentat that is being processed. This is
:param str docname: document that is being processed. This is
used to report warnings.
This is called from within :meth:`.process_doc` after our superclass
Expand Down Expand Up @@ -508,6 +508,7 @@ def generate_sample_data(self, all_objects, fake_factory):


def normalize_object_name(obj_name):
"""Adjust object names to conform with our preferences."""
return re.sub(r'\s+', '-', obj_name).strip('-').lower()


Expand Down
5 changes: 5 additions & 0 deletions test_sphinxjsondomain.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import sphinxjsondomain

def test_normalize_object_name():
"""Test object name normalization."""
assert True

0 comments on commit 619a87e

Please sign in to comment.