#2 Add first test case on publisher base class
Closed 7 years ago by nkondras. Opened 7 years ago by agustinhenze.
agustinhenze/skt first-test-case  into  master

file modified
+11
@@ -11,6 +11,17 @@ 

  

      $ sudo yum install python2 python2-junit_xml beaker-client

  

+ Run tests

+ ---------

+ 

+ For running all tests write down:

+ 

+     $ python -m unittest discover tests

+ 

+ For running some specific tests you can do this as following:

+ 

+     $ python -m unittest tests.test_publisher

+ 

  License

  -------

  skt is distributed under GPLv2 license.

empty or binary file added
@@ -0,0 +1,8 @@ 

+ import unittest

+ from skt import publisher

+ 

+ 

+ class TestPublisher(unittest.TestCase):

+     def test_geturl(self):

+         pub = publisher.publisher('dest', 'file:///tmp/test')

+         self.assertEqual(pub.geturl('source'), 'file:///tmp/test/source')

Hi, I added the first test case with the aim to serve as skeleton for the rest of test cases. I'd like to know what do you think to see if we are on the same line and in that case keep adding more test cases.

This looks good, thank you, Augustin! Would you be available for adding more test cases?

Hi @nkondras, of course I can add more test cases. However I'd like to add them in another PR to keep it simple. So if you wan to merge this, please go ahead.

Sure. Thank you, Augustin. We need those tests. Do you mind squashing these three commits into one, though? Otherwise this is a little too fine-grained. Meanwhile we'll try to figure out how to have CI for this repo, so that we can run the tests automatically.

Having CI would be great! Ok, I can squash them but I want to tell you anyway that I like to have small and simple atomic commits :).

rebased onto e128bd3

7 years ago

rebased onto df2c159

7 years ago

We've got to balance the size of commits vs review time and history length, but otherwise I agree, logically-independent, atomic commits are the best. Rebased and merged in 55a06aa. I only modified the subject to start with a verb in imperative mood, as is customary, and to better match the content. Thank you!

Pull-Request has been closed by nkondras

7 years ago