Skip to content

Commit

Permalink
Merge pull request #5 from christian-hawk/fix_import_submodules_to_mo…
Browse files Browse the repository at this point in the history
…dule

Fix import submodules to module
fixed setup.py requires
  • Loading branch information
christian-hawk authored Sep 28, 2020
2 parents 67ee57f + 924492e commit 4fb05fd
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 3 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/unit_test.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name: Test and report
# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch

on:
push:
branches:
Expand Down
1 change: 1 addition & 0 deletions pydoautomator/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from .droplet import Droplet
from .automator import Automator
6 changes: 5 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="pydoautomator",
version="0.1.2",
version="0.1.3",
author="Christian Eland",
author_email="[email protected]",
description="The Digital Ocean automations lib",
Expand All @@ -20,4 +20,8 @@
"Operating System :: OS Independent",
],
python_requires='>=3.6',
install_requires=[
"pydantic>=1.6.1",
"requests>=2.24.0"
]
)
24 changes: 24 additions & 0 deletions tests/unit_tdd/test_package_basics.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,27 @@ def test_if_Droplet_is_from_droplet_submodule(self):
pydoautomator.Droplet.__module__ == 'pydoautomator.droplet',
'pydoautomator.Droplet is NOT a module from pydoautomator.droplet'
)

def test_if_Automator_exists_in_package(self):
self.assertTrue(
hasattr(pydoautomator, 'Automator'),
'Automator does not exists in package'
)

def test_Automator_should_be_not_none(self):
self.assertIsNotNone(
pydoautomator.Automator,
'Automator has None value!'
)

def test_if_Automator_is_a_class(self):
self.assertTrue(
inspect.isclass(pydoautomator.Automator),
'pydoautomator.Automator is not a class'
)

def test_if_Automator_is_from_automator_submodule(self):
self.assertTrue(
pydoautomator.Automator.__module__ == 'pydoautomator.automator',
'pydoautomator.Automator is NOT a module from pydoautomator.automator'
)

0 comments on commit 4fb05fd

Please sign in to comment.