Skip to content

Commit

Permalink
fixing the tests for old pythons
Browse files Browse the repository at this point in the history
  • Loading branch information
seperman committed Dec 6, 2024
1 parent 31d7275 commit 6d819f0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ sphinx-sitemap==2.6.0
sphinxemoji==0.3.1
flake8==7.1.1
python-dateutil==2.9.0.post0
orjson==3.10.11
orjson==3.10.12
wheel==0.45.0
tomli==2.1.0
tomli-w==1.1.0
Expand Down
2 changes: 1 addition & 1 deletion requirements-dev3.8.txt
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ sphinx-sitemap==2.6.0
sphinxemoji==0.2.0
flake8==7.1.0
python-dateutil==2.9.0.post0
orjson==3.10.5
orjson==3.10.12
wheel==0.43.0
tomli==2.0.1
tomli-w==1.0.0
Expand Down
3 changes: 2 additions & 1 deletion tests/test_command.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class TestCommands:

@pytest.mark.parametrize('name1, name2, expected_in_stdout, expected_exit_code', [
('t1.json', 't2.json', """dictionary_item_added": [\n "root[0][\'key3\']""", 0),
('t1_corrupt.json', 't2.json', "Error when loading t1: Illegal trailing comma before end of object: line 3 column 21 (char 45)\n", 1),
('t1_corrupt.json', 't2.json', "Error when loading t1:", 1),
('t1.json', 't2_json.csv', '"old_value": "value2"', 0),
('t2_json.csv', 't1.json', '"old_value": "value3"', 0),
('t1.csv', 't2.csv', '"new_value": "James"', 0),
Expand All @@ -23,6 +23,7 @@ class TestCommands:
def test_diff_command(self, name1, name2, expected_in_stdout, expected_exit_code):
t1 = os.path.join(FIXTURES_DIR, name1)
t2 = os.path.join(FIXTURES_DIR, name2)

runner = CliRunner()
result = runner.invoke(diff, [t1, t2])
assert result.exit_code == expected_exit_code, f"test_diff_command failed for {name1}, {name2}"
Expand Down

0 comments on commit 6d819f0

Please sign in to comment.