Skip to content

Commit 0e4b0b0

Browse files
committed
fix tests
1 parent 2effa69 commit 0e4b0b0

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

RAMP/version.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import pkg_resources
21
try:
3-
VERSION = pkg_resources.get_distribution("ramp-packer").version
2+
from importlib.metadata import version
3+
VERSION = version("ramp-packer")
44
except:
55
VERSION = "99.99.99"

test.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,22 @@ def validate_module_commands(commands):
4949
expected_command.append({"command_arity": -1,
5050
"command_name": "graph.QUERY",
5151
"first_key": 1,
52-
"flags": ["write","denyoom","noscript"],
52+
"flags": ["write", "denyoom", "module", "noscript"],
5353
"last_key": 1,
5454
"step": 1})
5555

5656
expected_command.append({"command_arity": -1,
5757
"command_name": "graph.DELETE",
5858
"first_key": 1,
59-
"flags": ["write","noscript"],
59+
"flags": ["write","module","noscript"],
6060
"last_key": 1,
6161
"step": 1})
6262

6363
expected_command.append({"command_name": "test"})
6464

65-
assert sorted(expected_command, key=lambda c: c['command_name']) == sorted(commands, key=lambda c: c['command_name'])
65+
expected_set = sorted(expected_command, key=lambda c: c['command_name'])
66+
actual_set = sorted(commands, key=lambda c: c['command_name'])
67+
assert expected_set == actual_set
6668

6769
def test_defaults():
6870
"""Test auto generated metadata from module is as expected."""

0 commit comments

Comments
 (0)