generated from nonchris/discord-bot
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from tipptop3d/main
add tests to converters
- Loading branch information
Showing
2 changed files
with
43 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() |