Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chore: Fix Minor Issue ✨ #601

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 10 additions & 9 deletions facebook_business/test/integration_test_runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
How to run:
python -m facebook_business.test.integration_test_runner
'''

import os, subprocess

DIRECTORY = os.path.dirname(os.path.abspath(__file__))
Expand All @@ -40,15 +41,15 @@
RUNNER = "runner"
CONSTANT = "constant"

integration_tests = []
for filename in os.listdir(DIRECTORY):
if filename.endswith(".py") \
and filename.startswith("integration_") \
and UTILS not in filename \
and RUNNER not in filename \
and CONSTANT not in filename:
integration_tests.append(filename.split(".")[0])

integration_tests = [
filename.split(".")[0]
for filename in os.listdir(DIRECTORY)
if filename.endswith(".py")
and filename.startswith("integration_")
and UTILS not in filename
and RUNNER not in filename
and CONSTANT not in filename
]

failed = False
for test in integration_tests:
Expand Down
7 changes: 3 additions & 4 deletions facebook_business/test/other_docs.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
python -m facebook_business.test.other_docs
'''


import os
import sys
import json
Expand All @@ -43,10 +44,8 @@ class InsightsDocsTestCase(DocsTestCase):
pass

if __name__ == '__main__':
handle = open(DocsDataStore.get('filename'), 'w')
handle.write('')
handle.close()

with open(DocsDataStore.get('filename'), 'w') as handle:
handle.write('')
try:
config_file = open('./config.json')
except IOError:
Expand Down