Skip to content

Commit

Permalink
Merge pull request #3 from tipptop3d/main
Browse files Browse the repository at this point in the history
add tests to converters
  • Loading branch information
nonchris authored Apr 1, 2024
2 parents 18dfc8a + a92ca74 commit 69a32cb
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Test Converters

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
# This is the version of the action for setting up Python, not the Python version.
uses: actions/setup-python@v4
with:
# Semantic version range syntax or exact version of a Python version
python-version: '3.10'
architecture: 'x64'
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run Tests
run: python -m unittest tests/EAEOEE_t_STc_S_c_NV_RT_R.py
17 changes: 17 additions & 0 deletions tests/EAEOEE_t_STc_S_c_NV_RT_R.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import unittest
from src.discord_bot.lib import OEE__c_NV_RT_RS

class EAEOEE_t_STc_S_c_NV_RT_R(unittest.TestCase):
# Due to python limitations, we are forced tu use partial snake_case here
def test_EAEEAEOE__s_PL_C_M_NTc_S_2c_D_(self):
self.assertEqual(OEE__c_NV_RT_RS.EAEEAEOE__r_PL_C_M_NTc_S_2c_D_('MySuperCoolVariableName420'), 'ueooaiaeae__MyS_p_rC__lV_r__bl_N_m_420')

def test_OAAIAE__t_s_RC_ST_Cc_S_(self):
# seems to be the intended behaviour
self.assertEqual(OEE__c_NV_RT_RS.OAAIAE__t_s_RC_ST_Cc_S_('my variable_name with spaces_420'), 'mYvARIABLENAMEwITHsPACES420')

def test_EAEEAE__r_PL_C_M_NTc_S_(self):
self.assertEqual(OEE__c_NV_RT_RS.EAEEAE__r_PL_C_M_NTc_S_('my_super_cool_VaRiablE_name_420'), 'UEOOAIAEAE__mYS_P_RC__LV_R__BL_N_M_420')

if __name__ == '__main__':
unittest.main()

0 comments on commit 69a32cb

Please sign in to comment.