Skip to content

Commit

Permalink
Prune logic not required to run the tests with PyTest.
Browse files Browse the repository at this point in the history
With UnitTest, adding the module to import paths was mandatory.

PyTest runs fine without that, as long as the logic is organized into a
package.
  • Loading branch information
kocielnik authored and Patryk Kocielnik committed Jul 26, 2024
1 parent 19ab28e commit 56fddf4
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
5 changes: 0 additions & 5 deletions tests/test_MSNMoney.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,8 @@
"""Tests for the MSNMoney.py functions."""


import os
import sys
import unittest

app_path = os.path.join(os.path.dirname(__file__), "..", 'isthisstockgood')
sys.path.append(app_path)

from isthisstockgood.Active.MSNMoney import MSNMoney

class MSNMoneyTest(unittest.TestCase):
Expand Down
7 changes: 1 addition & 6 deletions tests/test_RuleOneInvestingCalculations.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,9 @@
"""Tests for the app/RuleOneInvestingCalculations.py functions."""


import os
import sys
import unittest

app_path = os.path.join(os.path.dirname(__file__), "..", 'isthisstockgood')
sys.path.append(app_path)

import RuleOneInvestingCalculations as RuleOne
import isthisstockgood.RuleOneInvestingCalculations as RuleOne

class RuleOneInvestingCalculationsTest(unittest.TestCase):

Expand Down

0 comments on commit 56fddf4

Please sign in to comment.