Skip to content

Commit

Permalink
Merge pull request #1956 from huge-success/fix-load-module-test
Browse files Browse the repository at this point in the history
Fix load module test
  • Loading branch information
ashleysommer authored Oct 25, 2020
2 parents fb3d368 + 5d7b073 commit 9e048bc
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,13 @@ def open_local(paths, mode="r", encoding="utf8"):
ujson,
"aiofiles>=0.3.0",
"websockets>=8.1,<9.0",
"multidict>=4.0,<5.0",
"multidict==5.0.0",
"httpx==0.15.4",
]

tests_require = [
"pytest==5.2.1",
"multidict>=4.0,<5.0",
"multidict==5.0.0",
"gunicorn",
"pytest-cov",
"httpcore==0.3.0",
Expand Down
11 changes: 6 additions & 5 deletions tests/test_load_module_from_file_location.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
@pytest.fixture
def loaded_module_from_file_location():
return load_module_from_file_location(
str(Path(__file__).parent / "static/app_test_config.py")
str(Path(__file__).parent / "static" / "app_test_config.py")
)


Expand All @@ -20,10 +20,11 @@ def test_load_module_from_file_location(loaded_module_from_file_location):


@pytest.mark.dependency(depends=["test_load_module_from_file_location"])
def test_loaded_module_from_file_location_name(
loaded_module_from_file_location,
):
assert loaded_module_from_file_location.__name__ == "app_test_config"
def test_loaded_module_from_file_location_name(loaded_module_from_file_location,):
name = loaded_module_from_file_location.__name__
if "C:\\" in name:
name = name.split("\\")[-1]
assert name == "app_test_config"


def test_load_module_from_file_location_with_non_existing_env_variable():
Expand Down

0 comments on commit 9e048bc

Please sign in to comment.