Skip to content

Commit 47813ca

Browse files
authored
Fixed upload script (#1)
1 parent 2d3ddb3 commit 47813ca

3 files changed

Lines changed: 13 additions & 9 deletions

File tree

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@
44
tests/configuration*.json
55
!tests/configuration.example.json
66
example.png
7+
aspose_barcode_cloud.egg-info/
8+
build/
79
dist/

scripts/Makefile

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,14 @@ format:
1313
test:
1414
tox $(SRC)
1515

16+
.PHONY: clean
17+
clean:
18+
cd $(ROOT) && git clean -dfx --exclude tests/configuration*.json
19+
1620
.PHONY: dist
17-
dist: format test
21+
dist: clean
1822
cd $(ROOT) && python3 setup.py sdist bdist_wheel
1923

2024
.PHONY: upload
21-
upload: dist
22-
cd $(ROOT) && python3 -m twine upload --repository testpypi dist/*
23-
24-
.PHONY: clean
25-
clean:
26-
cd $(ROOT) && git clean -dfx
25+
upload: format test dist
26+
cd $(ROOT) && python3 -m twine upload dist/*

tests/test_auth.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33

44
from aspose_barcode_cloud import Configuration, ApiClient, BarcodeApi, EncodeBarcodeType
55

6+
CONFIG_FILENAME = os.path.join(os.path.split(os.path.abspath(__file__))[0], 'configuration.qa.json')
67

8+
9+
@unittest.skipUnless(os.path.exists(CONFIG_FILENAME), "Requested file '%s' does not exist" % CONFIG_FILENAME)
710
class TestAuth(unittest.TestCase):
811

912
@classmethod
1013
def setUpClass(cls):
11-
cls.config = Configuration.from_file(os.path.join(os.path.split(os.path.abspath(__file__))[0],
12-
'configuration.json'))
14+
cls.config = Configuration.from_file(CONFIG_FILENAME)
1315
cls.api_client = ApiClient(cls.config)
1416
cls.api = BarcodeApi(cls.api_client)
1517

0 commit comments

Comments
 (0)