mirror of
https://github.com/Farama-Foundation/Gymnasium.git
synced 2025-08-01 06:07:08 +00:00
Attempt to fix blackjack rendering tests (#2565)
* Consistently use os.path.join * Update setup.py Try to fix tests again
This commit is contained in:
committed by
GitHub
parent
95d649fdec
commit
186934562f
@@ -153,12 +153,12 @@ class BlackjackEnv(gym.Env):
|
|||||||
|
|
||||||
def get_image(path):
|
def get_image(path):
|
||||||
cwd = os.path.dirname(__file__)
|
cwd = os.path.dirname(__file__)
|
||||||
image = pygame.image.load(cwd + "/" + path)
|
image = pygame.image.load(os.path.join(cwd, path))
|
||||||
return image
|
return image
|
||||||
|
|
||||||
def get_font(path, size):
|
def get_font(path, size):
|
||||||
cwd = os.path.dirname(__file__)
|
cwd = os.path.dirname(__file__)
|
||||||
font = pygame.font.Font((cwd + "/" + path), size)
|
font = pygame.font.Font(os.path.join(cwd, path), size)
|
||||||
return font
|
return font
|
||||||
|
|
||||||
small_font = get_font(
|
small_font = get_font(
|
||||||
|
2
setup.py
2
setup.py
@@ -55,6 +55,8 @@ setup(
|
|||||||
"gym": [
|
"gym": [
|
||||||
"envs/mujoco/assets/*.xml",
|
"envs/mujoco/assets/*.xml",
|
||||||
"envs/classic_control/assets/*.png",
|
"envs/classic_control/assets/*.png",
|
||||||
|
"envs/toy_text/font/*.ttf",
|
||||||
|
"envs/toy_text/img/*.png",
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
tests_require=["pytest", "mock"],
|
tests_require=["pytest", "mock"],
|
||||||
|
Reference in New Issue
Block a user