Skip to content

Commit 009d5bb

Browse files
committed
Create Makefile and update message in test
1 parent 57dda50 commit 009d5bb

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

.genignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
# ignore human-written test files
44
tests/test_utils_retries.py
5+
6+
# ignore Makefile
7+
Makefile

Makefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
PACKAGE_NAME := unstructured-python-client
2+
CURRENT_DIR := $(shell pwd)
3+
ARCH := $(shell uname -m)
4+
5+
###########
6+
# Install #
7+
###########
8+
9+
test-install:
10+
pip install requests_mock
11+
12+
#################
13+
# Test and Lint #
14+
#################
15+
16+
.PHONY: test
17+
test:
18+
PYTHONPATH=. pytest \
19+
tests

tests/test_utils_retries.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,8 @@
1111
def get_api_key():
1212
api_key = os.getenv("UNS_API_KEY")
1313
if api_key is None:
14-
raise ValueError("UNS_API_KEY environment variable not set")
14+
raise ValueError("""UNS_API_KEY environment variable not set.
15+
Set it in your current shell session with `export UNS_API_KEY=<api_key>`""")
1516
return api_key
1617

1718
# this test requires UNS_API_KEY be set in your shell session. Ex: `export UNS_API_KEY=<api_key>`

0 commit comments

Comments
 (0)